Use lsb_release for system information retrieval

This commit is contained in:
Nicolas Saillant 2024-05-06 15:29:07 +02:00
parent 94d45552bc
commit 2edba44559
1 changed files with 11 additions and 7 deletions

View File

@ -361,13 +361,17 @@ include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake)
cgal_setup_module_path() cgal_setup_module_path()
if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
message(STATUS "Operating system:") find_program(LSB_RELEASE_EXEC lsb_release)
execute_process( if(LSB_RELEASE_EXEC)
COMMAND uname -a execute_process(
TIMEOUT 5 COMMAND ${LSB_RELEASE_EXEC} -ds
OUTPUT_VARIABLE uname_a OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
ERROR_VARIABLE uname_a) OUTPUT_STRIP_TRAILING_WHITESPACE
message(STATUS "${uname_a}") )
message(STATUS "Operating system: ${LSB_RELEASE_ID_SHORT} ${CMAKE_SYSTEM_PROCESSOR}")
else()
message(STATUS "Operating system: ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
endif()
cgal_display_compiler_version() cgal_display_compiler_version()
endif() endif()