diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e8d0a5ca0d..e7c000c785 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,7 +33,12 @@ set(CONFIG_VERSION_GIT_HASH "N/A") if(DEFINED ENV{GIT_HASH} AND NOT $ENV{GIT_HASH} STREQUAL "") set(CONFIG_VERSION_GIT_HASH "$ENV{GIT_HASH}") elseif(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/../.git") - exec_program("${GIT_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/../" ARGS rev-parse --verify --short HEAD OUTPUT_VARIABLE CONFIG_VERSION_GIT_HASH) + execute_process( + COMMAND "${GIT_EXECUTABLE}" rev-parse --verify --short HEAD + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../" + OUTPUT_VARIABLE CONFIG_VERSION_GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) endif() cmake_host_system_information(RESULT CONFIG_CPU_COUNT QUERY NUMBER_OF_PHYSICAL_CORES) diff --git a/src/CMakeModules/Bootstrap_Linux.cmake b/src/CMakeModules/Bootstrap_Linux.cmake index fe285513f8..11badc9eda 100644 --- a/src/CMakeModules/Bootstrap_Linux.cmake +++ b/src/CMakeModules/Bootstrap_Linux.cmake @@ -6,6 +6,10 @@ include(FetchContent) if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() +# Prefer the new boost helper +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() set(ENABLE_HTML ON CACHE BOOL "Enable CEF and HTML producer") set(USE_STATIC_BOOST ON CACHE BOOL "Use shared library version of Boost") diff --git a/src/CMakeModules/Bootstrap_Windows.cmake b/src/CMakeModules/Bootstrap_Windows.cmake index aaad16b300..4f7abcb79f 100644 --- a/src/CMakeModules/Bootstrap_Windows.cmake +++ b/src/CMakeModules/Bootstrap_Windows.cmake @@ -5,6 +5,10 @@ include(ExternalProject) if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() +# Prefer the new boost helper +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() set(BOOST_USE_PRECOMPILED ON CACHE BOOL "Use precompiled boost")