diff --git a/CMakeLists.txt b/CMakeLists.txt index 96c2a43642..1fc2bd3f0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,61 @@ set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" ) +# Target architecture - auto-detected if not specified +set(TARGET "" CACHE STRING "Target CPU architecture (e.g. HASWELL, SANDYBRIDGE, NEHALEM, ARMV8, POWER9). Auto-detected if not specified.") + +# Binary type (32-bit or 64-bit) +set(BINARY "" CACHE STRING "Build a 32-bit or 64-bit library (32 or 64). Auto-detected if not specified. Note: 32-bit disables AVX.") + +# Threading options +set(USE_THREAD "" CACHE STRING "Enable multi-threading (0=disabled, 1=enabled). Auto-detected based on NUM_THREADS if not specified.") +option(USE_OPENMP "Use OpenMP for threading instead of pthreads" OFF) +set(NUM_THREADS "" CACHE STRING "Maximum number of threads. Auto-detected from CPU cores if not specified.") +set(NUM_PARALLEL "1" CACHE STRING "Number of parallel OpenBLAS instances when using OpenMP (default: 1)") + +# 64-bit integer interface +option(INTERFACE64 "Use 64-bit integers for array indices (equivalent to -i8 in ifort)" OFF) + +# Vector extension control +option(NO_AVX "Disable AVX kernel support (use for compatibility with older systems)" OFF) +option(NO_AVX2 "Disable AVX2 optimizations" OFF) +option(NO_AVX512 "Disable AVX512 optimizations" OFF) + +# Memory tuning options +set(BUFFERSIZE "" CACHE STRING "Memory buffer size factor (32<