CMake: Add policy 0177 to normalize install paths
Also sort policies by number.
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
# As of February 2025 we require CMake 3.22.0
|
||||
cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR)
|
||||
|
||||
|
||||
# As of cMake 3.27, find_package() will look for both case-sensitive and all-uppercase versions
|
||||
# of the package. This seems to affect FLANN as included by Pixi
|
||||
if(POLICY CMP0144)
|
||||
cmake_policy(SET CMP0144 NEW)
|
||||
endif()
|
||||
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated, but are still in use by
|
||||
# all versions of Shiboken2. This policy must be kept at OLD until Shiboken2 is no longer
|
||||
# supported
|
||||
if(POLICY CMP0148)
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
# The exec_program command was deprecated in cMake 3.0, and policy CMP0153 was added in cMake
|
||||
# 3.28 to control whether this gives a warning (the OLD behavior) or a fatal error (NEW)
|
||||
if(POLICY CMP0153)
|
||||
cmake_policy(SET CMP0153 NEW)
|
||||
endif()
|
||||
|
||||
# Suppress 'FindBoost module is removed' warning. Will use BoostConfig.cmake instead
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
@@ -11,24 +31,11 @@ if(POLICY CMP0175)
|
||||
cmake_policy(SET CMP0175 NEW)
|
||||
endif()
|
||||
|
||||
# FindPythonInterp and FindPythonLibs modules are deprecated, but are still in use by
|
||||
# all versions of Shiboken2. This policy must be kept at OLD until Shiboken2 is no longer
|
||||
# supported
|
||||
if(POLICY CMP0148)
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
# Added in cMake 3.31, enforce normalization of all DESTINATION paths given to install()
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
# As of cMake 3.27, find_package() will look for both case-sensitive and all-uppercase versions
|
||||
# of the package. This seems to affect FLANN as included by Pixi
|
||||
if(POLICY CMP0144)
|
||||
cmake_policy(SET CMP0144 NEW)
|
||||
endif()
|
||||
|
||||
# The exec_program command was deprecated in cMake 3.0, and policy CMP0153 was added in cMake
|
||||
# 3.28 to control whether this gives a warning (the OLD behavior) or a fatal error (NEW)
|
||||
if(POLICY CMP0153)
|
||||
cmake_policy(SET CMP0153 NEW)
|
||||
endif()
|
||||
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user