From 7a4e20e7f74554924147c749aa02930e127578a0 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Tue, 18 Feb 2025 20:26:32 -0600 Subject: [PATCH] CMake: Add policy CMP0175 --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71356ec69e..e4361f8fb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,16 @@ -# As of January 2023 we require CMake 3.16.3 -# see https://forum.freecad.org/viewtopic.php?f=10&t=72173 -# for further info why -cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR) +# As of February 2025 we require CMake 3.22.0 +cmake_minimum_required(VERSION 3.22.0 FATAL_ERROR) # Suppress 'FindBoost module is removed' warning. Will use BoostConfig.cmake instead if(POLICY CMP0167) cmake_policy(SET CMP0167 NEW) endif() +# As of cMake 3.31 add_custom_command() rejects invalid arguments +if(POLICY CMP0175) + cmake_policy(SET CMP0175 NEW) +endif() + # policy CMP0072 was introduced with CMake 3.11 # relates to FindOpenGL module # and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY