From 0ec43463c732cc4d7a57dafe48909bee0af1116a Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay Date: Fri, 29 Nov 2024 17:12:20 +0100 Subject: [PATCH] Update the externals. Increased the required CMake version to 3.25 in the externals, to be able to finally simplify the CMake code setting them up, at least a little. Updated the versions of: - Covfie; - Detray; - Algebra Plugins; - Vecmem. All so that oneAPI 2025.0.0 could be used for the build. --- extern/CMakeLists.txt | 26 ------------------ extern/acts/CMakeLists.txt | 18 ++----------- extern/algebra-plugins/CMakeLists.txt | 20 +++----------- extern/alpaka/CMakeLists.txt | 27 ++++--------------- extern/benchmark/CMakeLists.txt | 22 ++++----------- extern/cccl/CMakeLists.txt | 9 +++---- extern/covfie/CMakeLists.txt | 23 +++------------- extern/detray/CMakeLists.txt | 31 ++++----------------- extern/dfelibs/CMakeLists.txt | 16 +++-------- extern/dpl/CMakeLists.txt | 16 ++--------- extern/eigen3/CMakeLists.txt | 39 +++------------------------ extern/googletest/CMakeLists.txt | 17 ++++++------ extern/indicators/CMakeLists.txt | 16 ++--------- extern/kokkos/CMakeLists.txt | 18 +++---------- extern/rocThrust/CMakeLists.txt | 25 +++-------------- extern/tbb/CMakeLists.txt | 18 +++---------- extern/vecmem/CMakeLists.txt | 11 +++----- 17 files changed, 59 insertions(+), 293 deletions(-) delete mode 100644 extern/CMakeLists.txt diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt deleted file mode 100644 index f976867d14..0000000000 --- a/extern/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# TRACCC library, part of the ACTS project (R&D line) -# -# (c) 2021 CERN for the benefit of the ACTS project -# -# Mozilla Public License Version 2.0 - -# Turn off the installation of GoogleTest. -option(INSTALL_GTEST "Flag controlling the installation of GTest" OFF) - -# Needed once the benachmark external will be added to the build. -#set(BENCHMARK_ENABLE_INSTALL OFF) -#set(BENCHMARK_ENABLE_TESTING OFF) - -# Add the external submodules. -if (NOT TARGET dfelibs) - add_subdirectory(dfelibs) -endif() -if (NOT TARGET gtest) - add_subdirectory(googletest) -endif() - -# enable vecmem for algebra plugins -if (NOT ${ALGEBRA_PLUGIN_SOURCE_DIR}) - SET(ALGEBRA_PLUGIN_USE_VECMEM ON CACHE BOOL "Use Vecmem for array algebra") - add_subdirectory(algebra-plugins) -endif() diff --git a/extern/acts/CMakeLists.txt b/extern/acts/CMakeLists.txt index 7c0e7dc8b6..6421f699cd 100644 --- a/extern/acts/CMakeLists.txt +++ b/extern/acts/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Acts as part of the TRACCC project" ) @@ -21,16 +16,7 @@ set( TRACCC_ACTS_SOURCE "URL;https://github.com/acts-project/acts/archive/refs/tags/v38.0.0.tar.gz;URL_MD5;295c73b1069e571af92e6d853a069e65" CACHE STRING "Source for Acts, when built as part of this project" ) mark_as_advanced( TRACCC_ACTS_SOURCE ) - -# Mark the import as a system library on modern CMake versions -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0) - set(TRACCC_ACTS_SOURCE_FULL "${TRACCC_ACTS_SOURCE};SYSTEM") -else() - set(TRACCC_ACTS_SOURCE_FULL "${TRACCC_ACTS_SOURCE}") -endif() -mark_as_advanced( TRACCC_ACTS_SOURCE_FULL ) - -FetchContent_Declare( Acts ${TRACCC_ACTS_SOURCE_FULL} ) +FetchContent_Declare( Acts SYSTEM ${TRACCC_ACTS_SOURCE} ) # Options used in the build of Acts. set( ACTS_SETUP_EIGEN3 FALSE CACHE BOOL diff --git a/extern/algebra-plugins/CMakeLists.txt b/extern/algebra-plugins/CMakeLists.txt index 2625c6ff9c..14984e7196 100644 --- a/extern/algebra-plugins/CMakeLists.txt +++ b/extern/algebra-plugins/CMakeLists.txt @@ -5,24 +5,18 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Algebra Plugins as part of the TRACCC project" ) # Declare where to get Algebra Plugins from. set( TRACCC_ALGEBRA_PLUGINS_SOURCE - "URL;https://github.com/acts-project/algebra-plugins/archive/refs/tags/v0.25.0.tar.gz;URL_MD5;8201744f8b2a8ff7fbcf21bd1b4549b9" + "URL;https://github.com/krasznaa/algebra-plugins/archive/refs/tags/v0.25.1.tar.gz;URL_MD5;fa75a55330ad37ec812842fd7a07eb15" CACHE STRING "Source for Algebra Plugins, when built as part of this project" ) - mark_as_advanced( TRACCC_ALGEBRA_PLUGINS_SOURCE ) -FetchContent_Declare( AlgebraPlugins ${TRACCC_ALGEBRA_PLUGINS_SOURCE} ) +FetchContent_Declare( AlgebraPlugins SYSTEM ${TRACCC_ALGEBRA_PLUGINS_SOURCE} ) # Options used in the build of Algebra Plugins. set( ALGEBRA_PLUGINS_BUILD_TESTING FALSE CACHE BOOL @@ -41,13 +35,5 @@ set( ALGEBRA_PLUGINS_SETUP_GOOGLETEST FALSE CACHE BOOL set( ALGEBRA_PLUGINS_SETUP_BENCHMARK FALSE CACHE BOOL "Do not set up GoogleTest in Algebra Plugins" ) -# Disable a pesky warning coming from the Vc build. -include( CheckCXXCompilerFlag ) -check_cxx_compiler_flag( "-Wno-deprecated-enum-enum-conversion" - TRACCC_HAS_NO_DEPRECATED_ENUM_ENUM_CONVERSION ) -if( TRACCC_HAS_NO_DEPRECATED_ENUM_ENUM_CONVERSION ) - traccc_add_flag( CMAKE_CXX_FLAGS "-Wno-deprecated-enum-enum-conversion" ) -endif() - # Get it into the current directory. FetchContent_MakeAvailable( AlgebraPlugins ) diff --git a/extern/alpaka/CMakeLists.txt b/extern/alpaka/CMakeLists.txt index 1a7225d222..86ac59a18b 100644 --- a/extern/alpaka/CMakeLists.txt +++ b/extern/alpaka/CMakeLists.txt @@ -1,18 +1,13 @@ # TRACCC library, part of the ACTS project (R&D line) # -# (c) 2022 CERN for the benefit of the ACTS project +# (c) 2022-2024 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.16 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Alpaka as part of the TRACCC project" ) @@ -21,22 +16,10 @@ set( TRACCC_ALPAKA_SOURCE "URL;https://github.com/alpaka-group/alpaka/archive/refs/tags/1.2.0.tar.gz;URL_MD5;0e2dcf4ddf7987532835d7b2b3680843" CACHE STRING "Source for Alpaka, when built as part of this project" ) mark_as_advanced( TRACCC_ALPAKA_SOURCE ) -FetchContent_Declare( Alpaka ${TRACCC_ALPAKA_SOURCE} ) +FetchContent_Declare( Alpaka SYSTEM ${TRACCC_ALPAKA_SOURCE} ) -#Turn off build testing -if( DEFINED CACHE{BUILD_TESTING} ) - set( _buildTestingValue ${BUILD_TESTING} ) -endif() -set( BUILD_TESTING FALSE CACHE INTERNAL "Forceful setting of BUILD_TESTING" ) +# Turn off build testing. +set( BUILD_TESTING FALSE ) # Get it into the current directory. FetchContent_MakeAvailable( Alpaka ) - -# Reset the BUILD_TESTING variable. -if( DEFINED _buildTestingValue ) - set( BUILD_TESTING ${_buildTestingValue} CACHE BOOL "Turn tests on/off" - FORCE ) - unset( _buildTestingValue ) -else() - unset( BUILD_TESTING CACHE ) -endif() diff --git a/extern/benchmark/CMakeLists.txt b/extern/benchmark/CMakeLists.txt index 42470158eb..2bd405ef80 100644 --- a/extern/benchmark/CMakeLists.txt +++ b/extern/benchmark/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required(VERSION 3.11) +cmake_minimum_required(VERSION 3.25) include(FetchContent) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message(STATUS "Building Google Benchmark as part of the TRACCC project") @@ -21,16 +16,7 @@ set(TRACCC_BENCHMARK_SOURCE "URL;https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz;URL_MD5;7b93dd03670665684f1b2e9b70ad17fe" CACHE STRING "Source for Google Benchmark, when built as part of this project") mark_as_advanced(TRACCC_BENCHMARK_SOURCE) - -# Mark the import as a system library on modern CMake versions -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0) - set(TRACCC_BENCHMARK_SOURCE_FULL "${TRACCC_BENCHMARK_SOURCE};SYSTEM") -else() - set(TRACCC_BENCHMARK_SOURCE_FULL "${TRACCC_BENCHMARK_SOURCE}") -endif() -mark_as_advanced( TRACCC_BENCHMARK_SOURCE_FULL ) - -FetchContent_Declare(Benchmark ${TRACCC_BENCHMARK_SOURCE_FULL}) +FetchContent_Declare(Benchmark SYSTEM ${TRACCC_BENCHMARK_SOURCE}) # Options used in the build of Google Benchmark. set(BUILD_SHARED_LIBS FALSE) @@ -43,4 +29,6 @@ FetchContent_MakeAvailable(Benchmark) # Set up an alias for the Google Benchmark target with the same name that it # has when we find it pre-installed. -add_library(benchmark::benchmark ALIAS benchmark) +if( NOT TARGET benchmark::benchmark ) + add_library(benchmark::benchmark ALIAS benchmark) +endif() diff --git a/extern/cccl/CMakeLists.txt b/extern/cccl/CMakeLists.txt index 71db560638..c81bce97c5 100644 --- a/extern/cccl/CMakeLists.txt +++ b/extern/cccl/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building CCCL as part of the TRACCC project" ) @@ -21,6 +16,8 @@ set( TRACCC_CCCL_SOURCE "GIT_REPOSITORY;https://github.com/stephenswat/cccl.git;GIT_TAG;build/allow_installing_when_downstream" CACHE STRING "Source for CCCL, when built as part of this project" ) mark_as_advanced( TRACCC_CCCL_SOURCE ) +# Note that we must not use SYSTEM here. Otherwise nvcc would pick up Thrust +# from its own installation, and not from the version that we are downloading. FetchContent_Declare( CCCL ${TRACCC_CCCL_SOURCE} ) # There are a few things to configure here... May not all be necessary but diff --git a/extern/covfie/CMakeLists.txt b/extern/covfie/CMakeLists.txt index c7bb4e421d..d72ce12b0e 100644 --- a/extern/covfie/CMakeLists.txt +++ b/extern/covfie/CMakeLists.txt @@ -1,36 +1,22 @@ # TRACCC library, part of the ACTS project (R&D line) # -# (c) 2023 CERN for the benefit of the ACTS project +# (c) 2023-2024 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Fetching covfie as part of the traccc project" ) # Declare where to get covfie from. set( TRACCC_COVFIE_SOURCE - "URL;https://github.com/acts-project/covfie/archive/refs/tags/v0.8.1.tar.gz;URL_MD5;0b4dc9624533d1ed4ea7a763da47f07e" + "URL;https://github.com/acts-project/covfie/archive/refs/tags/v0.11.0.tar.gz;URL_MD5;9f41c9308e7801ac6319c470a1ec4212" CACHE STRING "Source for covfie, when built as part of this project" ) mark_as_advanced( TRACCC_COVFIE_SOURCE ) - -# Mark the import as a system library on modern CMake versions -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0) - set(TRACCC_COVFIE_SOURCE_FULL "${TRACCC_COVFIE_SOURCE};SYSTEM") -else() - set(TRACCC_COVFIE_SOURCE_FULL "${TRACCC_COVFIE_SOURCE}") -endif() -mark_as_advanced( TRACCC_COVFIE_SOURCE_FULL ) - -FetchContent_Declare( covfie ${TRACCC_COVFIE_SOURCE_FULL} ) +FetchContent_Declare( covfie SYSTEM ${TRACCC_COVFIE_SOURCE} ) # Options used for covfie. set( COVFIE_BUILD_EXAMPLES OFF CACHE BOOL "Build covfie examples") @@ -40,7 +26,6 @@ set( COVFIE_BUILD_BENCHMARKS OFF CACHE BOOL "Build covfie benchmarks") set( COVFIE_PLATFORM_CPU ON CACHE BOOL "Enable covfie CPU platform") set( COVFIE_PLATFORM_CUDA ${TRACCC_BUILD_CUDA} CACHE BOOL "Enable covfie CUDA platform") -set( COVFIE_REQUIRE_CXX20 OFF CACHE BOOL "Enable covfie C++20 requirement") set( COVFIE_QUIET ON CACHE BOOL "Quiet covfie feature warnings") # Get it into the current directory. diff --git a/extern/detray/CMakeLists.txt b/extern/detray/CMakeLists.txt index f6a36bd817..3725d2d024 100644 --- a/extern/detray/CMakeLists.txt +++ b/extern/detray/CMakeLists.txt @@ -5,33 +5,18 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Detray as part of the TRACCC project" ) # Declare where to get Detray from. set( TRACCC_DETRAY_SOURCE -"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.82.0.tar.gz;URL_MD5;09d777ce126c547f5c3d4ec509f9a0c0" +"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.83.0.tar.gz;URL_MD5;99542ac2b8b4235678a16f3c4fb25382" CACHE STRING "Source for Detray, when built as part of this project" ) - mark_as_advanced( TRACCC_DETRAY_SOURCE ) - -# Mark the import as a system library on modern CMake versions -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0) - set(TRACCC_DETRAY_SOURCE_FULL "${TRACCC_DETRAY_SOURCE};SYSTEM") -else() - set(TRACCC_DETRAY_SOURCE_FULL "${TRACCC_DETRAY_SOURCE}") -endif() -mark_as_advanced( TRACCC_DETRAY_SOURCE_FULL ) - -FetchContent_Declare( Detray ${TRACCC_DETRAY_SOURCE_FULL} ) +FetchContent_Declare( Detray SYSTEM ${TRACCC_DETRAY_SOURCE} ) # Options used in the build of Detray. set( DETRAY_CUSTOM_SCALARTYPE "float" CACHE STRING @@ -50,14 +35,8 @@ set( DETRAY_BUILD_TUTORIALS FALSE CACHE BOOL set( DETRAY_EIGEN_PLUGIN TRUE CACHE BOOL "Turn on the build of the Detray Eigen code" ) -# Needed for 'performance', 'simulation', 'examples', 'tests' and 'benchmarks' -if( TRACCC_BUILD_IO OR TRACCC_BUILD_EXAMPLES OR (BUILD_TESTING AND TRACCC_BUILD_TESTING) OR TRACCC_BUILD_BENCHMARKS ) - set( DETRAY_BUILD_TEST_UTILS TRUE CACHE BOOL - "Turn on the build of the Detray tests utilities if needed" ) -else() - set( DETRAY_BUILD_TEST_UTILS FALSE CACHE BOOL - "Turn off the build of the Detray tests utilities" ) -endif() +set( DETRAY_BUILD_TEST_UTILS TRUE CACHE BOOL + "Turn on the build of the Detray tests utilities, needed in this project" ) set( DETRAY_BUILD_VALIDATION_TOOLS FALSE CACHE BOOL "Turn off the build of the Detray validation tools" ) diff --git a/extern/dfelibs/CMakeLists.txt b/extern/dfelibs/CMakeLists.txt index c51a87f63c..24caaf4b92 100644 --- a/extern/dfelibs/CMakeLists.txt +++ b/extern/dfelibs/CMakeLists.txt @@ -1,18 +1,13 @@ # TRACCC library, part of the ACTS project (R&D line) # -# (c) 2021-2022 CERN for the benefit of the ACTS project +# (c) 2021-2024 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building dfelibs as part of the TRACCC project" ) @@ -21,7 +16,7 @@ set( TRACCC_DFELIBS_SOURCE "URL;https://github.com/acts-project/dfelibs/archive/refs/tags/v20211029.tar.gz;URL_MD5;87fb09c5a11b98250f5e266e9cd501ea" CACHE STRING "Source for dfelibs, when built as part of this project" ) mark_as_advanced( TRACCC_DFELIBS_SOURCE ) -FetchContent_Declare( dfelibs ${TRACCC_DFELIBS_SOURCE} ) +FetchContent_Declare( dfelibs SYSTEM ${TRACCC_DFELIBS_SOURCE} ) # Options used in the build of dfelibs. set( dfelibs_BUILD_EXAMPLES FALSE CACHE BOOL @@ -33,8 +28,3 @@ set( dfelibs_ENABLE_INSTALL TRUE CACHE BOOL # Get it into the current directory. FetchContent_MakeAvailable( dfelibs ) - -get_target_property( _incDirs dfelibs INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( dfelibs - SYSTEM INTERFACE ${_incDirs} ) -unset( _incDirs ) diff --git a/extern/dpl/CMakeLists.txt b/extern/dpl/CMakeLists.txt index 1c9df1f349..dc88cf5aef 100644 --- a/extern/dpl/CMakeLists.txt +++ b/extern/dpl/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building oneDPL as part of the TRACCC project" ) @@ -21,17 +16,10 @@ set( TRACCC_DPL_SOURCE "URL;https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-2022.6.0-rc1.tar.gz;URL_MD5;f52a2ed5c9e4cdb3c65c2465b50abecf" CACHE STRING "Source for DPL, when built as part of this project" ) mark_as_advanced( TRACCC_DPL_SOURCE ) -FetchContent_Declare( DPL ${TRACCC_DPL_SOURCE} ) +FetchContent_Declare( DPL SYSTEM ${TRACCC_DPL_SOURCE} ) # Set the default oneDPL threading backend. set( ONEDPL_BACKEND "dpcpp" CACHE STRING "oneDPL threading backend" ) # Get it into the current directory. FetchContent_MakeAvailable( DPL ) - -# Treat the oneDPL headers as "system headers", to avoid getting warnings from -# them. -get_target_property( _incDirs oneDPL INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( oneDPL - SYSTEM INTERFACE ${_incDirs} ) -unset( _incDirs ) \ No newline at end of file diff --git a/extern/eigen3/CMakeLists.txt b/extern/eigen3/CMakeLists.txt index 9205d4ce25..3ddf18038b 100644 --- a/extern/eigen3/CMakeLists.txt +++ b/extern/eigen3/CMakeLists.txt @@ -1,18 +1,13 @@ # TRACCC library, part of the ACTS project (R&D line) # -# (c) 2021-2022 CERN for the benefit of the ACTS project +# (c) 2021-2024 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Eigen3 as part of the TRACCC project" ) @@ -21,13 +16,10 @@ set( TRACCC_EIGEN_SOURCE "URL;https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2;URL_MD5;132dde48fe2b563211675626d29f1707" CACHE STRING "Source for Eigen, when built as part of this project" ) mark_as_advanced( TRACCC_EIGEN_SOURCE ) -FetchContent_Declare( Eigen3 ${TRACCC_EIGEN_SOURCE} ) +FetchContent_Declare( Eigen3 SYSTEM ${TRACCC_EIGEN_SOURCE} ) # Configure the Eigen build. -if( DEFINED CACHE{BUILD_TESTING} ) - set( _buildTestingValue ${BUILD_TESTING} ) -endif() -set( BUILD_TESTING FALSE CACHE INTERNAL "Forceful setting of BUILD_TESTING" ) +set( BUILD_TESTING FALSE ) set( EIGEN_BUILD_DOC FALSE CACHE BOOL "Turn off the Eigen documentation build" ) set( EIGEN_TEST_NOQT TRUE CACHE BOOL @@ -35,26 +27,3 @@ set( EIGEN_TEST_NOQT TRUE CACHE BOOL # Get it into the current directory. FetchContent_MakeAvailable( Eigen3 ) - -# Reset the BUILD_TESTING variable. -if( DEFINED _buildTestingValue ) - set( BUILD_TESTING ${_buildTestingValue} CACHE BOOL "Turn tests on/off" - FORCE ) - unset( _buildTestingValue ) -else() - unset( BUILD_TESTING CACHE ) -endif() - -# Treat the Eigen headers as "system headers", to avoid getting warnings from -# them. -get_target_property( _incDirs eigen INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( eigen - SYSTEM INTERFACE ${_incDirs} ) -unset( _incDirs ) - -# For some wicked reason CUDA keeps complaining about the Eigen headers, even -# though they are set up from a "system include path". So I had to explicitly -# disable the warning triggered by those headers, for anything that uses them. -# This is pretty bad, as we're now blind to these types of warnings/errors. :-( -target_compile_options( eigen INTERFACE - $<$:-Xcudafe --diag_suppress=20012> ) diff --git a/extern/googletest/CMakeLists.txt b/extern/googletest/CMakeLists.txt index 70fb0865b7..2adacefb48 100644 --- a/extern/googletest/CMakeLists.txt +++ b/extern/googletest/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.11 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building GoogleTest as part of the TRACCC project" ) @@ -21,7 +16,7 @@ set( TRACCC_GOOGLETEST_SOURCE "URL;https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz;URL_MD5;7e11f6cfcf6498324ac82d567dcb891e" CACHE STRING "Source for GoogleTest, when built as part of this project" ) mark_as_advanced( TRACCC_GOOGLETEST_SOURCE ) -FetchContent_Declare( GoogleTest ${TRACCC_GOOGLETEST_SOURCE} ) +FetchContent_Declare( GoogleTest SYSTEM ${TRACCC_GOOGLETEST_SOURCE} ) # Options used in the build of GoogleTest. set( BUILD_GMOCK TRUE CACHE BOOL "Turn off the build of GMock" ) @@ -39,5 +34,9 @@ FetchContent_MakeAvailable( GoogleTest ) # Set up aliases for the GTest targets with the same name that they have # when we find GTest pre-installed. -add_library( GTest::gtest ALIAS gtest ) -add_library( GTest::gtest_main ALIAS gtest_main ) +if( NOT TARGET GTest::gtest ) + add_library( GTest::gtest ALIAS gtest ) +endif() +if( NOT TARGET GTest::gtest_main ) + add_library( GTest::gtest_main ALIAS gtest_main ) +endif() diff --git a/extern/indicators/CMakeLists.txt b/extern/indicators/CMakeLists.txt index a446a0a8ff..e0392b9328 100644 --- a/extern/indicators/CMakeLists.txt +++ b/extern/indicators/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building indicators as part of the TRACCC project" ) @@ -21,7 +16,7 @@ set( TRACCC_INDICATORS_SOURCE "URL;https://github.com/p-ranav/indicators/archive/refs/tags/v2.3.tar.gz;URL_MD5;317d2658fbb45d9d192f88ae0f1c9e9d" CACHE STRING "Source for indicators, when built as part of this project" ) mark_as_advanced( TRACCC_INDICATORS_SOURCE ) -FetchContent_Declare( Indicators ${TRACCC_INDICATORS_SOURCE} ) +FetchContent_Declare( Indicators SYSTEM ${TRACCC_INDICATORS_SOURCE} ) # Configure the indicators build. set( INDICATORS_BUILD_TESTS FALSE CACHE BOOL @@ -33,10 +28,3 @@ set( INDICATORS_DEMO FALSE CACHE BOOL # Get it into the current directory. FetchContent_MakeAvailable( Indicators ) - -# Treat the indicators headers as "system headers", to avoid getting warnings -# from them. -get_target_property( _incDirs indicators INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( indicators - SYSTEM INTERFACE ${_incDirs} ) -unset( _incDirs ) diff --git a/extern/kokkos/CMakeLists.txt b/extern/kokkos/CMakeLists.txt index d06dfe66ca..abde8f636e 100644 --- a/extern/kokkos/CMakeLists.txt +++ b/extern/kokkos/CMakeLists.txt @@ -1,18 +1,13 @@ # TRACCC library, part of the ACTS project (R&D line) # -# (c) 2022-2023 CERN for the benefit of the ACTS project +# (c) 2022-2024 CERN for the benefit of the ACTS project # # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.16 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building Kokkos as part of the TRACCC project" ) @@ -21,7 +16,7 @@ set( TRACCC_KOKKOS_SOURCE "URL;https://github.com/kokkos/kokkos/archive/refs/tags/4.3.01.tar.gz;URL_MD5;243de871b3dc2cf3990c1c404032df83" CACHE STRING "Source for Kokkos, when built as part of this project" ) mark_as_advanced( TRACCC_KOKKOS_SOURCE ) -FetchContent_Declare( Kokkos ${TRACCC_KOKKOS_SOURCE} ) +FetchContent_Declare( Kokkos SYSTEM ${TRACCC_KOKKOS_SOURCE} ) # Default options for the Kokkos build. set( Kokkos_ENABLE_SERIAL TRUE CACHE BOOL @@ -31,10 +26,3 @@ set( BUILD_SHARED_LIBS TRUE CACHE BOOL # Get it into the current directory. FetchContent_MakeAvailable( Kokkos ) - -# Treat the Kokkos headers as "system headers", to avoid getting warnings from -# them. -get_target_property( _incDirs kokkoscore INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( kokkoscore - SYSTEM PUBLIC ${_incDirs} ) -unset( _incDirs ) diff --git a/extern/rocThrust/CMakeLists.txt b/extern/rocThrust/CMakeLists.txt index 32ac5cd143..f4e37213d1 100644 --- a/extern/rocThrust/CMakeLists.txt +++ b/extern/rocThrust/CMakeLists.txt @@ -5,14 +5,9 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building rocThrust as part of the TRACCC project" ) @@ -23,27 +18,15 @@ set( TRACCC_ROCTHRUST_SOURCE set( TRACCC_ROCTHRUST_PATCH "PATCH_COMMAND;patch;-p1;<;${CMAKE_CURRENT_SOURCE_DIR}/rocm-6.1.1.patch" CACHE STRING "Patch for rocThrust, when built as part of this project" ) -mark_as_advanced( TRACCC_ROCTHRUST_SOURCE ) -FetchContent_Declare( rocThrust +mark_as_advanced( TRACCC_ROCTHRUST_SOURCE TRACCC_ROCTHRUST_PATCH ) +FetchContent_Declare( rocThrust SYSTEM ${TRACCC_ROCTHRUST_SOURCE} ${TRACCC_ROCTHRUST_PATCH} ) # Settings for the rocThrust build. -if( DEFINED CACHE{BUILD_TESTING} ) - set( _buildTestingValue ${BUILD_TESTING} ) -endif() -set( BUILD_TESTING FALSE CACHE INTERNAL "Forceful setting of BUILD_TESTING" ) +set( BUILD_TESTING FALSE ) set( HIP_COMPILER "clang" ) set( HIP_CXX_COMPILER "hipcc" ) # Get it into the current directory. FetchContent_MakeAvailable( rocThrust ) - -# Reset the BUILD_TESTING variable. -if( DEFINED _buildTestingValue ) - set( BUILD_TESTING ${_buildTestingValue} CACHE BOOL "Turn tests on/off" - FORCE ) - unset( _buildTestingValue ) -else() - unset( BUILD_TESTING CACHE ) -endif() diff --git a/extern/tbb/CMakeLists.txt b/extern/tbb/CMakeLists.txt index 616cadfc56..91889aeee7 100644 --- a/extern/tbb/CMakeLists.txt +++ b/extern/tbb/CMakeLists.txt @@ -5,23 +5,18 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.24 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building TBB as part of the TRACCC project" ) # Declare where to get TBB from. set( TRACCC_TBB_SOURCE - "URL;https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.13.0.tar.gz;URL_MD5;f287cd007240a838286ff13e7deaee12" + "URL;https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2022.0.0.tar.gz;URL_MD5;78ec44cecf3cd78c4984e61f1bb93134" CACHE STRING "Source for TBB, when built as part of this project" ) mark_as_advanced( TRACCC_TBB_SOURCE ) -FetchContent_Declare( TBB ${TRACCC_TBB_SOURCE} OVERRIDE_FIND_PACKAGE ) +FetchContent_Declare( TBB SYSTEM ${TRACCC_TBB_SOURCE} OVERRIDE_FIND_PACKAGE ) # Options used in the build of TBB. set( TBB_TEST FALSE CACHE BOOL "Turn off the TBB tests" ) @@ -29,10 +24,3 @@ set( TBB_STRICT FALSE CACHE BOOL "Do not throw errors on compiler warnings" ) # Get it into the current directory. FetchContent_MakeAvailable( TBB ) - -# Treat the TBB headers as "system headers", to avoid getting warnings from -# them. -get_target_property( _incDirs tbb INTERFACE_INCLUDE_DIRECTORIES ) -target_include_directories( tbb - SYSTEM INTERFACE ${_incDirs} ) -unset( _incDirs ) diff --git a/extern/vecmem/CMakeLists.txt b/extern/vecmem/CMakeLists.txt index c58388ef9a..fa608e7454 100644 --- a/extern/vecmem/CMakeLists.txt +++ b/extern/vecmem/CMakeLists.txt @@ -5,23 +5,18 @@ # Mozilla Public License Version 2.0 # CMake include(s). -cmake_minimum_required( VERSION 3.14 ) +cmake_minimum_required( VERSION 3.25 ) include( FetchContent ) -# Silence FetchContent warnings with CMake >=3.24. -if( POLICY CMP0135 ) - cmake_policy( SET CMP0135 NEW ) -endif() - # Tell the user what's happening. message( STATUS "Building VecMem as part of the TRACCC project" ) # Declare where to get VecMem from. set( TRACCC_VECMEM_SOURCE - "URL;https://github.com/acts-project/vecmem/archive/refs/tags/v1.11.0.tar.gz;URL_MD5;11c51d8212a119ed5862f16e23699382" + "URL;https://github.com/acts-project/vecmem/archive/refs/tags/v1.13.0.tar.gz;URL_MD5;02fe327552c21779f501c224b8c95e87" CACHE STRING "Source for VecMem, when built as part of this project" ) mark_as_advanced( TRACCC_VECMEM_SOURCE ) -FetchContent_Declare( VecMem ${TRACCC_VECMEM_SOURCE} ) +FetchContent_Declare( VecMem SYSTEM ${TRACCC_VECMEM_SOURCE} ) # Options used in the build of VecMem. set( VECMEM_BUILD_TESTING FALSE CACHE BOOL