Skip to content

Commit 0f967ee

Browse files
Fix Jammy builds
1 parent e671e2b commit 0f967ee

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ set(PYBIND11_FINDPYTHON ON)
55
find_package(pybind11 CONFIG REQUIRED)
66
find_package(Boost CONFIG REQUIRED)
77

8-
set(_USE_MT_RNG OFF)
98
# Check if the system is Ubuntu
10-
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
9+
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
1110
execute_process(
1211
COMMAND lsb_release -a
1312
OUTPUT_VARIABLE LSB_RELEASE_OUTPUT
@@ -21,11 +20,15 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
2120
message(STATUS "Ubuntu version: ${UBUNTU_VERSION}")
2221

2322
if ("${UBUNTU_VERSION}" STREQUAL "22.04")
24-
set(_USE_MT_RNG ON)
23+
option (USE_MT_RNG "Use mt19937 random number generator instead of taus88" ON)
24+
else ("${UBUNTU_VERSION}" STREQUAL "22.04")
25+
option (USE_MT_RNG "Use mt19937 random number generator instead of taus88" OFF)
2526
endif ("${UBUNTU_VERSION}" STREQUAL "22.04")
26-
endif()
27+
else (CMAKE_SYSTEM_NAME MATCHES "Linux")
28+
option (USE_MT_RNG "Use mt19937 random number generator instead of taus88" OFF)
29+
endif (CMAKE_SYSTEM_NAME MATCHES "Linux")
2730

28-
option (USE_MT_RNG "Use mt19937 random number generator instead of taus88" _USE_MT_RNG)
31+
message(STATUS "USE_MT_RNG: ${USE_MT_RNG}")
2932

3033
configure_file(FindAFactor/include/common/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/common/config.h @ONLY)
3134

0 commit comments

Comments
 (0)