From 0cede132008703f9089ef4df3abb60f9d6f9a9c0 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Tue, 18 Feb 2025 21:07:36 -0600 Subject: [PATCH] CMake: Set CMP0153 to NEW --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0224a70061..8b707c323a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,10 +14,16 @@ 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) +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() + option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON) if(FREECAD_USE_CCACHE)