The CMake policy CMP0144 generates an error with the latest CMake version (3.30.4). #17

Merged
Brecht Van Lommel merged 2 commits from Pierre-Pontier/cycles:fix/cmake_policy_cmp0144_is_not_know into main 2024-10-03 02:14:20 +02:00

View File

@ -36,7 +36,9 @@ cmake_policy(SET CMP0043 NEW)
# Use ROOT variables in find_package. # Use ROOT variables in find_package.
cmake_policy(SET CMP0074 NEW) cmake_policy(SET CMP0074 NEW)
if(POLICY CMP0144)
cmake_policy(SET CMP0144 NEW) cmake_policy(SET CMP0144 NEW)
endif()

Can you do instead do this? That way older CMake versions still use the new behavior as we want.

if(POLICY CMP0144)
  cmake_policy(SET CMP0144 NEW)
endif() 

In fact we should do this if/endif for all cmake_policy lines, for future proofing.

Can you do instead do this? That way older CMake versions still use the new behavior as we want. ``` if(POLICY CMP0144) cmake_policy(SET CMP0144 NEW) endif() ``` In fact we should do this if/endif for all `cmake_policy` lines, for future proofing.
# Avoid having empty buildtype. # Avoid having empty buildtype.
set(CMAKE_BUILD_TYPE_INIT "Release") set(CMAKE_BUILD_TYPE_INIT "Release")