File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,23 @@ find_package(pybind11 CONFIG REQUIRED)
66find_package (Boost CONFIG REQUIRED)
77
88set (_USE_MT_RNG OFF )
9- if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
10- if (CMAKE_SYSTEM_VERSION MATCHES "22\\ .04" )
9+ # Check if the system is Ubuntu
10+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
11+ execute_process (
12+ COMMAND lsb_release -a
13+ OUTPUT_VARIABLE LSB_RELEASE_OUTPUT
14+ )
15+
16+ # Extract the version number
17+ string (REGEX MATCH "Release:[ \t ]+([0-9.]+)"
18+ UBUNTU_VERSION "${LSB_RELEASE_OUTPUT} " )
19+ set (UBUNTU_VERSION "${CMAKE_MATCH_1} " )
20+
21+ message (STATUS "Ubuntu version: ${UBUNTU_VERSION} " )
22+
23+ if ("${UBUNTU_VERSION} " STREQUAL "22.04" )
1124 set (_USE_MT_RNG ON )
12- endif ( )
25+ endif ( " ${UBUNTU_VERSION} " STREQUAL "22.04" )
1326endif ()
1427
1528option (USE_MT_RNG "Use mt19937 random number generator instead of taus88" _USE_MT_RNG)
You can’t perform that action at this time.
0 commit comments