From 0cc148a6628a0db25b5ac2b0c6668882b9556118 Mon Sep 17 00:00:00 2001 From: Frederik Verdoner Barba Date: Mon, 5 Aug 2024 13:43:25 +0200 Subject: [PATCH] build: Improve traccc dependency loading This commit makes a few changes to the way some of the Acts R&D projects are loaded in Acts (i.e. detray, traccc, algebra-plugins), namely: 1. It adds code to load detray's dependencies if the Acts project is installed. 2. It updates the versions of detray and traccc so they are compatible. 3. It adds some documentation to the `thirdparty/` directory. 4. It refines the parameters for the CMake build systems of various projects to be more robust. Co-authored-by: Stephen Nicholas Swatman --- cmake/ActsConfig.cmake.in | 7 ++++++- cmake/ActsExternSources.cmake | 4 ++-- thirdparty/README.md | 20 ++++++++++++++++++++ thirdparty/algebra-plugins/CMakeLists.txt | 8 ++++---- thirdparty/detray/CMakeLists.txt | 10 ++++------ thirdparty/traccc/CMakeLists.txt | 4 +++- 6 files changed, 39 insertions(+), 14 deletions(-) diff --git a/cmake/ActsConfig.cmake.in b/cmake/ActsConfig.cmake.in index 362f293ce192..8e8caad49359 100644 --- a/cmake/ActsConfig.cmake.in +++ b/cmake/ActsConfig.cmake.in @@ -96,6 +96,12 @@ if(PluginPodio IN_LIST Acts_COMPONENTS) include(${CMAKE_CURRENT_LIST_DIR}/ActsPodioEdmTargets.cmake) endif() +if(PluginDetray IN_LIST Acts_COMPONENTS) + find_dependency(vecmem @vecmem_VERSION@ CONFIG EXACT) + find_dependency(algebra-plugins @algebra-plugins_VERSION@ CONFIG EXACT) + find_dependency(detray @detray_VERSION@ CONFIG EXACT) +endif() + # load **all** available components. we can not just include the requested # components since there can be interdependencies between them. if(NOT Acts_FIND_QUIETLY) @@ -108,4 +114,3 @@ foreach(_component ${Acts_COMPONENTS}) # include the targets file to create the imported targets for the user include(${CMAKE_CURRENT_LIST_DIR}/Acts${_component}Targets.cmake) endforeach() - diff --git a/cmake/ActsExternSources.cmake b/cmake/ActsExternSources.cmake index 95559701a043..f58a901a1c59 100644 --- a/cmake/ActsExternSources.cmake +++ b/cmake/ActsExternSources.cmake @@ -15,11 +15,11 @@ set( ACTS_COVFIE_SOURCE mark_as_advanced( ACTS_COVFIE_SOURCE ) set( ACTS_DETRAY_SOURCE - "URL;https://github.com/acts-project/detray/archive/refs/tags/v0.65.1.tar.gz;URL_MD5;fbf57a881565fa6019d79d13409b588f" CACHE STRING "Source to take DETRAY from") + "URL;https://github.com/acts-project/detray/archive/refs/tags/v0.72.1.tar.gz;URL_MD5;342ab0bfba45c5764c8eef3842897c16" CACHE STRING "Source to take DETRAY from") mark_as_advanced( ACTS_DETRAY_SOURCE ) set( ACTS_TRACCC_SOURCE - "URL;https://github.com/acts-project/traccc/archive/refs/tags/v0.10.0.tar.gz;URL_MD5;131399d26e3280c4d7f7ca2995efd256" CACHE STRING "Source to take TRACCC from") + "URL;https://github.com/acts-project/traccc/archive/refs/tags/v0.13.0.tar.gz;URL_MD5;1ddf757ddcbaa08fd7db3a7752ef7f98" CACHE STRING "Source to take TRACCC from") mark_as_advanced( ACTS_TRACCC_SOURCE ) set( ACTS_DFELIBS_SOURCE diff --git a/thirdparty/README.md b/thirdparty/README.md index 2c3c037f3a72..ca89ca9e0406 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -41,3 +41,23 @@ CMake instructions to build [Pybind11](https://github.com/pybind/pybind11), whic ## FRNN CMake instructions to build [FRNN](https://github.com/lxxue/FRNN), which is used by the Exa.TrkX plugin. + +## Algebra plugins + +CMake instruction to build [algebra-plugins](https://github.com/acts-project/algebra-plugins), which is used by the traccc plugin. + +## VecMem + +CMake instruction to build [VecMem](https://github.com/acts-project/vecmem), which is used by the traccc plugin. + +## Covfie + +CMake instruction to build [covfie](https://github.com/acts-project/covfie), which is used by the traccc plugin. + +## Detray + +CMake instruction to build [detray](https://github.com/acts-project/detray), which is used by the traccc plugin. + +## Traccc + +CMake instruction to build [traccc](https://github.com/acts-project/traccc), which is used by the traccc plugin. diff --git a/thirdparty/algebra-plugins/CMakeLists.txt b/thirdparty/algebra-plugins/CMakeLists.txt index e625715417f6..75fb0f9ad77b 100644 --- a/thirdparty/algebra-plugins/CMakeLists.txt +++ b/thirdparty/algebra-plugins/CMakeLists.txt @@ -19,8 +19,8 @@ set(ALGEBRA_PLUGINS_BUILD_TESTING FALSE CACHE BOOL "Turn off the build of the Algebra Plugins unit tests") set(ALGEBRA_PLUGINS_INCLUDE_EIGEN TRUE CACHE BOOL "Turn on the build of algebra::eigen") -set(ALGEBRA_PLUGINS_INCLUDE_VC TRUE CACHE BOOL - "Turn on the build of algebra::vc_array") +set(ALGEBRA_PLUGINS_INCLUDE_VC FALSE CACHE BOOL + "Turn off the build of algebra::vc_array") set(ALGEBRA_PLUGINS_INCLUDE_VECMEM TRUE CACHE BOOL "Turn on the build of algebra::vecmem_array") @@ -31,8 +31,8 @@ set(ALGEBRA_PLUGINS_INCLUDE_SMATRIX ${DETRAY_SMATRIX_PLUGIN} set(ALGEBRA_PLUGINS_SETUP_EIGEN3 OFF CACHE BOOL "Do not have Algebra Plugins set up Eigen3 for itself") -set(ALGEBRA_PLUGINS_SETUP_VC ON CACHE BOOL - "Have Algebra Plugins set up Vc for itself") +set(ALGEBRA_PLUGINS_SETUP_VC OFF CACHE BOOL + "Do not have Algebra Plugins set up Vc for itself") set(ALGEBRA_PLUGINS_USE_SYSTEM_VC OFF CACHE BOOL "Have Algebra Plugins build Vc itself") set(ALGEBRA_PLUGINS_SETUP_VECMEM FALSE CACHE BOOL diff --git a/thirdparty/detray/CMakeLists.txt b/thirdparty/detray/CMakeLists.txt index 8ec164e24406..074737ae7a5d 100644 --- a/thirdparty/detray/CMakeLists.txt +++ b/thirdparty/detray/CMakeLists.txt @@ -27,8 +27,8 @@ set( DETRAY_BUILD_TUTORIALS OFF CACHE BOOL "Turn off the build of the Detray tutorials" ) set( DETRAY_EIGEN_PLUGIN ON CACHE BOOL "Turn on the build of the Detray Eigen code" ) -set( DETRAY_VC_PLUGIN ON CACHE BOOL - "Turn on the build of the Detray Vc code" ) +set( DETRAY_VC_PLUGIN OFF CACHE BOOL + "Turn off the build of the Detray Vc code" ) set( DETRAY_SETUP_VECMEM OFF CACHE BOOL "Do not set up VecMem as part of Detray" ) @@ -48,10 +48,8 @@ set( DETRAY_SETUP_ACTSVG OFF CACHE BOOL "Do not set up Actsvg as part of Detray" ) set( DETRAY_SETUP_DFELIBS OFF CACHE BOOL "Do not set up Dfelibs as part of Detray" ) -#set( DETRAY_VC_PLUGIN OFF CACHE BOOL -# "Do not build Vc based math plugin" ) -#set( DETRAY_SVG_DISPLAY ON CACHE BOOL -# "Build the ActSVG display module" ) +set( DETRAY_SVG_DISPLAY ${ACTS_BUILD_PLUGIN_ACTSVG} CACHE BOOL + "Build the ActSVG display module depending on the ACTS_BUILD_PLUGIN_ACTSVG" ) #Now set up its build. diff --git a/thirdparty/traccc/CMakeLists.txt b/thirdparty/traccc/CMakeLists.txt index b62c9ba35f06..73597b29f36f 100644 --- a/thirdparty/traccc/CMakeLists.txt +++ b/thirdparty/traccc/CMakeLists.txt @@ -22,7 +22,7 @@ set( TRACCC_SETUP_VECMEM OFF CACHE BOOL "Do not set up Actsvg as part of Traccc" ) set( TRACCC_SETUP_EIGEN3 OFF CACHE BOOL "Do not set up Eigen3 as part of Traccc" ) -set( TRACCC_SETUP_THRUST OFF CACHE BOOL +set( TRACCC_SETUP_THRUST ON CACHE BOOL "Do not set up Thrust as part of Traccc" ) set( TRACCC_SETUP_ALGEBRA_PLUGINS OFF CACHE BOOL "Do not set up Algebra Plugins as part of Traccc" ) @@ -34,6 +34,8 @@ set( TRACCC_SETUP_DETRAY OFF CACHE BOOL "Do not set up Detray as part of Traccc" ) set( TRACCC_SETUP_ACTS OFF CACHE BOOL "Do not set up ACTS as part of Traccc" ) +set( TRACCC_SETUP_TBB OFF CACHE BOOL + "Do not set up TBB as part of Traccc" ) set( TRACCC_BUILD_TESTING OFF CACHE BOOL "Turn off the build of the Traccc unit tests" )