From c921214f8f468dba81c320133432b85c23f04b8c Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Tue, 23 Jul 2024 10:58:53 +0300 Subject: [PATCH] build: Remove extra minimum cmake versions, set policies (#3398) this messes with policy propagation --- CMakeLists.txt | 9 ++++++++- cmake/FindFilesystem.cmake | 1 - thirdparty/FRNN/CMakeLists.txt | 4 ---- thirdparty/GeoModel/CMakeLists.txt | 1 - thirdparty/actsvg/CMakeLists.txt | 1 - thirdparty/algebra-plugins/CMakeLists.txt | 3 +-- thirdparty/covfie/CMakeLists.txt | 3 +-- thirdparty/detray/CMakeLists.txt | 3 +-- thirdparty/dfelibs/CMakeLists.txt | 1 - thirdparty/nlohmann_json/CMakeLists.txt | 5 ----- thirdparty/pybind11/CMakeLists.txt | 1 - thirdparty/vecmem/CMakeLists.txt | 3 +-- 12 files changed, 12 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc91319a27..6d9a7695884 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,10 +222,17 @@ set(_acts_boost_recommended_version 1.78.0) # Include the sources for the external dependencies. include(ActsExternSources) +# Controls behavior of DOWNLOAD_EXTRACT_TIMESTAMP +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() + # required packages if (ACTS_SETUP_BOOST) if (ACTS_USE_SYSTEM_BOOST) - # NOTE FindBoost.cmake looks for BoostConfig.cmake first, before running it's own logic. + if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) + endif() # Enable both program_options and unit_test_framework to reduce complexity # Also Cuda tests seem to use program_options diff --git a/cmake/FindFilesystem.cmake b/cmake/FindFilesystem.cmake index c42d585c007..c34988752dd 100644 --- a/cmake/FindFilesystem.cmake +++ b/cmake/FindFilesystem.cmake @@ -104,7 +104,6 @@ if(TARGET std::filesystem) return() endif() -cmake_minimum_required(VERSION 3.10) include(CMakePushCheckState) include(CheckIncludeFileCXX) diff --git a/thirdparty/FRNN/CMakeLists.txt b/thirdparty/FRNN/CMakeLists.txt index 30161ebb276..3399ab3289b 100644 --- a/thirdparty/FRNN/CMakeLists.txt +++ b/thirdparty/FRNN/CMakeLists.txt @@ -5,8 +5,6 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. - -cmake_minimum_required(VERSION 3.11) include(FetchContent) message(STATUS "Building FRNN as part of the ACTS project") @@ -22,5 +20,3 @@ if(NOT frnncontent_POPULATED) configure_file(CMakeLists.txt.in "${frnncontent_SOURCE_DIR}/CMakeLists.txt" COPYONLY) add_subdirectory(${frnncontent_SOURCE_DIR} ${frnncontent_BINARY_DIR}) endif() - - diff --git a/thirdparty/GeoModel/CMakeLists.txt b/thirdparty/GeoModel/CMakeLists.txt index d61f948be2e..0adb3aede35 100644 --- a/thirdparty/GeoModel/CMakeLists.txt +++ b/thirdparty/GeoModel/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. diff --git a/thirdparty/actsvg/CMakeLists.txt b/thirdparty/actsvg/CMakeLists.txt index 2da1b0c7aa5..5b1622d3290 100644 --- a/thirdparty/actsvg/CMakeLists.txt +++ b/thirdparty/actsvg/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. diff --git a/thirdparty/algebra-plugins/CMakeLists.txt b/thirdparty/algebra-plugins/CMakeLists.txt index a0126cece7f..e625715417f 100644 --- a/thirdparty/algebra-plugins/CMakeLists.txt +++ b/thirdparty/algebra-plugins/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required(VERSION 3.14) include(FetchContent) # Tell the user what's happening. @@ -44,4 +43,4 @@ set(ALGEBRA_PLUGINS_SETUP_GOOGLETEST FALSE CACHE BOOL set(ALGEBRA_PLUGINS_SETUP_BENCHMARK FALSE CACHE BOOL "Do not setup Algebra Plugins benchmark") # Now set up its build. -FetchContent_MakeAvailable( AlgebraPlugins ) \ No newline at end of file +FetchContent_MakeAvailable( AlgebraPlugins ) diff --git a/thirdparty/covfie/CMakeLists.txt b/thirdparty/covfie/CMakeLists.txt index b74710c587b..bfd6da88215 100644 --- a/thirdparty/covfie/CMakeLists.txt +++ b/thirdparty/covfie/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required(VERSION 3.14) include(FetchContent) # Tell the user what's happening. @@ -30,4 +29,4 @@ set( COVFIE_REQUIRE_CXX20 OFF CACHE BOOL "Enable covfie C++20 requirement") set( COVFIE_QUIET ON CACHE BOOL "Quiet covfie feature warnings") # Now set up its build. -FetchContent_MakeAvailable( covfie ) \ No newline at end of file +FetchContent_MakeAvailable( covfie ) diff --git a/thirdparty/detray/CMakeLists.txt b/thirdparty/detray/CMakeLists.txt index 961057df933..8ec164e2440 100644 --- a/thirdparty/detray/CMakeLists.txt +++ b/thirdparty/detray/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. @@ -56,4 +55,4 @@ set( DETRAY_SETUP_DFELIBS OFF CACHE BOOL #Now set up its build. -FetchContent_MakeAvailable(Detray) \ No newline at end of file +FetchContent_MakeAvailable(Detray) diff --git a/thirdparty/dfelibs/CMakeLists.txt b/thirdparty/dfelibs/CMakeLists.txt index d95941b8406..c3dc15c53d0 100644 --- a/thirdparty/dfelibs/CMakeLists.txt +++ b/thirdparty/dfelibs/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. diff --git a/thirdparty/nlohmann_json/CMakeLists.txt b/thirdparty/nlohmann_json/CMakeLists.txt index 39aedcb2d5c..f54653556b0 100644 --- a/thirdparty/nlohmann_json/CMakeLists.txt +++ b/thirdparty/nlohmann_json/CMakeLists.txt @@ -1,13 +1,8 @@ -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. message( STATUS "Building nlohmann_json as part of the ACTS project" ) -if(POLICY CMP0135) - cmake_policy(SET CMP0135 NEW) -endif() - # Declare where to get nlohmann json from. FetchContent_Declare( nlohmann_json ${ACTS_NLOHMANNJSON_SOURCE} ) diff --git a/thirdparty/pybind11/CMakeLists.txt b/thirdparty/pybind11/CMakeLists.txt index 60b95573dfc..ac31675e057 100644 --- a/thirdparty/pybind11/CMakeLists.txt +++ b/thirdparty/pybind11/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. diff --git a/thirdparty/vecmem/CMakeLists.txt b/thirdparty/vecmem/CMakeLists.txt index b6d74615471..fca3f49572f 100644 --- a/thirdparty/vecmem/CMakeLists.txt +++ b/thirdparty/vecmem/CMakeLists.txt @@ -7,7 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) include( FetchContent ) # Tell the user what's happening. @@ -22,7 +21,7 @@ FetchContent_Declare( VecMem ${ACTS_VECMEM_SOURCE} ) set( VECMEM_BUILD_TESTING FALSE CACHE BOOL "Turn off the build of the VecMem unit tests" ) set( VECMEM_BUILD_BENCHMARKING FALSE CACHE BOOL - "Turn off the build of VecMem benchmarking" ) + "Turn off the build of VecMem benchmarking" ) # Now set up its build. FetchContent_MakeAvailable( VecMem )