You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Prevent in-tree builds to avoid overwriting Makefiles
11
+
if (CMAKE_SOURCE_DIRSTREQUALCMAKE_BINARY_DIR)
12
+
message(FATAL_ERROR"In-tree builds are not allowed. Use: cmake -B build -S .")
13
+
endif ()
14
+
10
15
set(OpenBLAS_MAJOR_VERSION 0)
11
16
set(OpenBLAS_MINOR_VERSION 3)
12
17
set(OpenBLAS_PATCH_VERSION 30.dev)
@@ -29,6 +34,10 @@ set(LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \"i
29
34
30
35
option(BUILD_TESTING"Build LAPACK testsuite when building LAPACK"ON)
31
36
37
+
option(BUILD_TESTS"Build the BLAS test suite (test/ and ctest/ directories)"ON)
38
+
39
+
option(BUILD_UTESTS"Build the unit tests (utest/ directory)"ON)
40
+
32
41
option(BUILD_BENCHMARKS"Build the collection of BLAS/LAPACK benchmarks"OFF)
33
42
34
43
option(C_LAPACK"Build LAPACK from C sources instead of the original Fortran"OFF)
@@ -39,8 +48,14 @@ option(DYNAMIC_ARCH "Include support for multiple CPU targets, with automatic se
39
48
40
49
option(DYNAMIC_OLDER"Include specific support for older x86 cpu models (Penryn,Dunnington,Atom,Nano,Opteron) with DYNAMIC_ARCH"OFF)
41
50
51
+
set(DYNAMIC_LIST ""CACHESTRING"Manually specify list of CPU targets for DYNAMIC_ARCH instead of default list (semicolon-separated, e.g., 'HASWELL;SKYLAKEX')")
52
+
53
+
set(TARGET_CORE ""CACHESTRING"Override TARGET for DYNAMIC_ARCH kernel selection. Used to specify which CPU-specific kernels to build.")
54
+
42
55
option(BUILD_RELAPACK"Build with ReLAPACK (recursive implementation of several LAPACK functions on top of standard LAPACK)"OFF)
43
56
57
+
option(RELAPACK_REPLACE"Use ReLAPACK to replace standard LAPACK routines instead of adding RELAPACK_ prefixed equivalents (requires BUILD_RELAPACK)"OFF)
58
+
44
59
option(USE_LOCKING"Use locks even in single-threaded builds to make them callable from multiple threads"OFF)
45
60
46
61
option(USE_PERL"Use the older PERL scripts for build preparation instead of universal shell scripts"OFF)
@@ -51,6 +66,7 @@ option(FIXED_LIBNAME "Use a non-versioned name for the library and no symbolic l
51
66
52
67
set(LIBNAMEPREFIX ""CACHESTRING"Add a prefix to the openblas part of the library name" )
53
68
set(LIBNAMESUFFIX ""CACHESTRING"Add a suffix after the openblas part of the library name" )
69
+
set(LIBSONAMEBASE "openblas"CACHESTRING"Base name for shared library soname (default: openblas)")
54
70
55
71
if(${CMAKE_SYSTEM_NAME}MATCHES"Linux")
56
72
option(NO_AFFINITY"Disable support for CPU affinity masks to avoid binding processes from e.g. R or numpy/scipy to a single core"ON)
@@ -81,6 +97,9 @@ set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in
81
97
# Target architecture - auto-detected if not specified
82
98
set(TARGET ""CACHESTRING"Target CPU architecture (e.g. HASWELL, SANDYBRIDGE, NEHALEM, ARMV8, POWER9). Auto-detected if not specified.")
83
99
100
+
# Force architecture (normally auto-detected from system)
101
+
set(ARCH ""CACHESTRING"Force architecture (x86, x86_64, arm, arm64, power, mips, mips64, zarch, loongarch64, riscv64). Auto-detected if not specified.")
102
+
84
103
# Binary type (32-bit or 64-bit)
85
104
set(BINARY ""CACHESTRING"Build a 32-bit or 64-bit library (32 or 64). Auto-detected if not specified. Note: 32-bit disables AVX.")
option(USE_TLS"Use thread-local storage instead of central memory buffer (requires glibc 2.21+)"OFF)
110
132
option(CONSISTENT_FPCSR"Synchronize floating-point CSR between threads (x86/x86_64/aarch64 only)"OFF)
133
+
set(THREAD_TIMEOUT ""CACHESTRING"Thread spin-wait timeout as power of 2 cycles, e.g. 26 means 2^26 cycles (~25ms at 3GHz). Range: 4-30. Empty = default (28).")
111
134
112
135
# System configuration
113
136
option(BIGNUMA"Support systems with more than 16 NUMA nodes or more than 256 CPUs (Linux only)"OFF)
114
137
option(EMBEDDED"Build for embedded/bare-metal systems (requires custom malloc/free)"OFF)
138
+
option(ARM_SOFTFP_ABI"Use soft floating-point ABI on ARM (for compatibility with soft-float systems)"OFF)
115
139
116
140
# Precision type options (default: build all types if all OFF)
117
141
option(BUILD_SINGLE"Build single precision (REAL) functions"OFF)
option(SANITY_CHECK"Compare results against reference BLAS (slow, for testing only)"OFF)
155
+
option(UTEST_CHECK"Enable unit test result checking (implies SANITY_CHECK)"OFF)
130
156
131
157
# Memory allocation methods
158
+
option(SHMEM_ALLOCATION"Use shared memory for buffer allocation"OFF)
159
+
option(STATIC_ALLOCATION"Use static memory allocation (for single-threaded or embedded use)"OFF)
132
160
option(HUGETLB_ALLOCATION"Use huge pages for thread buffers via shared memory"OFF)
133
161
set(HUGETLBFILE_ALLOCATION ""CACHESTRING"Path to hugetlbfs mount for huge page allocation (e.g. /hugepages)")
134
162
option(DEVICEDRIVER_ALLOCATION"Use device driver for physically contiguous memory allocation"OFF)
@@ -174,8 +202,6 @@ if(MSVC AND MSVC_STATIC_CRT)
174
202
endforeach()
175
203
endif()
176
204
177
-
message(WARNING"CMake support is experimental. It does not yet support all build options and may not produce the same Makefiles that OpenBLAS ships with.")
0 commit comments