From 034c2675d9ef2fb7cb4efd07428e096a9bd2b70d Mon Sep 17 00:00:00 2001 From: Louis Gombert Date: Thu, 5 Dec 2024 22:25:34 +0100 Subject: [PATCH 1/2] Specify POST_BUILD for add_custom_command in CMakeLists Comply with policy CMP0175 introduced by CMake 3.31 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index abe92825a..bd1e7e04e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,7 @@ endif() add_custom_target(get_git_hash ALL) add_custom_command( + POST_BUILD TARGET get_git_hash COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${PROJECT_SOURCE_DIR} From 87c9a8eb0eda97bbc73e71c05379aefab4e3eb0b Mon Sep 17 00:00:00 2001 From: Louis Gombert Date: Thu, 5 Dec 2024 23:23:43 +0100 Subject: [PATCH 2/2] Set CMake 3.31 policy CMP0177 Introduces path normalization for install() DESTINATION --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd1e7e04e..16292a43f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,10 @@ project(Descent3 VERSION 1.6.0 ) +if(POLICY CMP0177) # install() DESTINATION path are normalized + cmake_policy(SET CMP0177 NEW) +endif() + option(BUILD_TESTING "Enable testing. Requires GTest." OFF) option(ENABLE_LOGGER "Enable logging to the terminal" OFF) option(ENABLE_MEM_RTL "Enable Real-time library memory management functions (disable to verbose memory allocations)" ON)