Skip to content

Commit

Permalink
fix: some cmake warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 9, 2025
1 parent c676f8f commit 2cbcd22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeModules/Bootstrap_Linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeModules/Bootstrap_Windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 2cbcd22

Please sign in to comment.