From 18529cd04c3c01ddb5ac3948d2772ec609e17740 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Fri, 26 Sep 2025 12:23:19 +0300 Subject: [PATCH] get rid of CMP0175 CMake warning CMake 3.30 and earlier silently ignored unsupported keywords and missing or invalid arguments for the different forms of the add_custom_command() command. CMake 3.31 implements more rigorous argument checking and will flag invalid or missing arguments as errors. The OLD behavior of this policy will accept the same invalid keywords or arguments as CMake 3.30 and earlier. See https://cmake.org/cmake/help/latest/policy/CMP0175.html docs. --- On systems with CMake version 3.31 and higher - let's get rid of the warning. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e2723e..dcbba0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.16) +cmake_policy(SET CMP0175 OLD) # set the output directory for built objects. # This makes sure that the dynamic library goes into the build directory automatically.