@@ -11,22 +11,14 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
1111set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR } )
1212
1313# ============================
14- # Precision / SIMD mode options
14+ # Precision options (scalar only)
1515# ============================
16- option (NEXT_FP32 "Use 32-bit floats (scalar)" OFF )
17- option (NEXT_FP64 "Use 64-bit floats (scalar)" ON )
18- option (NEXT_SIMD32 "Use 32-bit SIMD (SSE)" OFF )
19- option (NEXT_SIMD64 "Use 64-bit SIMD (SSE)" OFF )
20- option (NEXT_AVX512_32 "Use 32-bit SIMD (AVX-512)" OFF )
21- option (NEXT_AVX512_64 "Use 64-bit SIMD (AVX-512)" OFF )
16+ option (NEXT_FP32 "Use 32-bit floats (scalar)" OFF )
17+ option (NEXT_FP64 "Use 64-bit floats (scalar)" ON )
2218
2319set (NEXT_MODES
2420 NEXT_FP32
2521 NEXT_FP64
26- NEXT_SIMD32
27- NEXT_SIMD64
28- NEXT_AVX512_32
29- NEXT_AVX512_64
3022)
3123
3224# Count enabled modes
@@ -39,36 +31,18 @@ endforeach()
3931
4032# Enforce exactly one mode
4133if (NEXT_MODE_COUNT EQUAL 0)
42- message (FATAL_ERROR "You must enable one precision/SIMD mode ." )
34+ message (FATAL_ERROR "You must enable NEXT_FP64 or NEXT_FP32 ." )
4335elseif (NEXT_MODE_COUNT GREATER 1)
44- message (FATAL_ERROR "You must enable ONLY ONE of: NEXT_FP32, NEXT_FP64, NEXT_SIMD32, NEXT_SIMD64, NEXT_AVX512_32, NEXT_AVX512_64 ." )
36+ message (FATAL_ERROR "Enable only one precision mode ." )
4537endif ()
4638
4739# ============================
48- # Apply compile definitions and flags
40+ # Apply compile definitions
4941# ============================
5042if (NEXT_FP32)
5143 add_compile_definitions (NEXT_FP32 )
52-
5344elseif (NEXT_FP64)
5445 add_compile_definitions (NEXT_FP64 )
55-
56- elseif (NEXT_SIMD32)
57- add_compile_definitions (NEXT_SIMD32 )
58- add_compile_options (-msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 )
59-
60- elseif (NEXT_SIMD64)
61- add_compile_definitions (NEXT_SIMD64 )
62- add_compile_options (-msse2 -msse3 -mssse3 -msse4.1 -msse4.2 )
63-
64- elseif (NEXT_AVX512_32)
65- add_compile_definitions (NEXT_AVX512_32 )
66- add_compile_options (-mavx512f -mavx512dq -mavx512vl )
67-
68- elseif (NEXT_AVX512_64)
69- add_compile_definitions (NEXT_AVX512_64 )
70- add_compile_options (-mavx512f -mavx512dq -mavx512vl )
71-
7246endif ()
7347
7448# ============================
0 commit comments