Skip to content

Commit 2f1cae8

Browse files
committed
- fix for Python linux build
1 parent 9c919a2 commit 2f1cae8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMake/Common.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ set(CMAKE_RELWITHDEBINFO_POSTFIX "_rd")
99
set(CMAKE_MINSIZEREL_POSTFIX "_ms")
1010

1111
include(CMakeDependentOption)
12-
include(avx)
12+
1313

1414
OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
1515
if (USE_DOUBLE_PRECISION)
1616
add_definitions( -DUSE_DOUBLE)
17-
else()
17+
message("AVX is only supported for single precision.")
18+
endif (USE_DOUBLE_PRECISION)
19+
20+
cmake_dependent_option(USE_AVX "Use AVX" ON "NOT USE_DOUBLE_PRECISION" OFF)
21+
if (USE_AVX)
22+
include(avx)
1823
set_avx_flags()
1924
if (FOUND_AVX2)
2025
message(STATUS "Using AVX2")

0 commit comments

Comments
 (0)