From 885959a36b0d1799f8ff0ce33b9421e4fa340906 Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Tue, 7 Jan 2025 07:51:36 -0500 Subject: [PATCH] Use new CMake policies up to 3.29 This silences most warnings about overriding /W3 with /w --- CMakeLists.txt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85c3d1b44..453006d41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,23 +1,8 @@ -cmake_minimum_required(VERSION 3.9) -if (POLICY CMP0082) - cmake_policy(SET CMP0082 NEW) # install from sub-directories immediately -endif() -if (POLICY CMP0102) -cmake_policy(SET CMP0102 NEW) # set policy on advanced variables and cmake cache -endif() -if (POLICY CMP0156) -cmake_policy(SET CMP0156 NEW) # new linker strategies -endif() +cmake_minimum_required(VERSION 3.9...3.29) if (POLICY CMP0167) cmake_policy(SET CMP0167 OLD) # Don't complain about boost endif() -# allow parent project to override options -if (POLICY CMP0077) - cmake_policy(SET CMP0077 NEW) -endif(POLICY CMP0077) - - # Set the version number for the library set (GTSAM_VERSION_MAJOR 4) set (GTSAM_VERSION_MINOR 3)