Skip to content

Commit f9f8115

Browse files
committed
Update ACTS to version 46.5.0 and use its detray
This commit updates our ACTS dependency to version 46.5.0. It also removes our own external detray mechanisms and relies almost entirely on ACTS to provide detray. Until ACTS directly exposes the detray targets, we still need to FetchContent the detray content from the ACTS repository. Also automatically adds the ITk detector metadata if it is not provided.
1 parent 6cd309f commit f9f8115

6 files changed

Lines changed: 24 additions & 91 deletions

File tree

.github/workflows/builds.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ jobs:
114114
- name: Build ACTS
115115
run: |
116116
export CMAKE_PREFIX_PATH=/json_install/:${CMAKE_PREFIX_PATH}
117-
wget https://github.com/acts-project/acts/archive/refs/tags/v46.0.0.tar.gz
118-
tar -xvf v46.0.0.tar.gz
117+
wget https://github.com/acts-project/acts/archive/refs/tags/v46.5.0.tar.gz
118+
tar -xvf v46.5.0.tar.gz
119119
export CXX=g++
120120
cmake \
121-
-S acts-46.0.0 \
121+
-S acts-46.5.0 \
122122
-B /acts_build/ \
123123
-DACTS_BUILD_PLUGIN_JSON=ON \
124124
-DACTS_USE_SYSTEM_NLOHMANN_JSON=ON \
@@ -137,6 +137,7 @@ jobs:
137137
-DDETRAY_USE_SYSTEM_NLOHMANN=ON \
138138
-DTRACCC_SUPPORTED_DETECTORS="default_detector;odd_detector;telescope_detector;toy_detector;itk_detector" \
139139
-DDETRAY_GENERATE_METADATA="itk_metadata" \
140+
-FETCHCONTENT_SOURCE_DIR_DETRAY="acts-46.5.0/Detray" \
140141
-S ${GITHUB_WORKSPACE} \
141142
-B build
142143
- name: Build

CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -298,20 +298,6 @@ if( TRACCC_SETUP_COVFIE )
298298
endif()
299299
endif()
300300

301-
# Set up Detray.
302-
option( TRACCC_SETUP_DETRAY
303-
"Set up the Detray target(s) explicitly" TRUE )
304-
option( TRACCC_USE_SYSTEM_DETRAY
305-
"Pick up an existing installation of Detray from the build environment"
306-
${TRACCC_USE_SYSTEM_LIBS} )
307-
if( TRACCC_SETUP_DETRAY )
308-
if( TRACCC_USE_SYSTEM_DETRAY )
309-
find_package( detray REQUIRED )
310-
else()
311-
add_subdirectory( extern/detray )
312-
endif()
313-
endif()
314-
315301
# Set up Acts.
316302
option( TRACCC_SETUP_ACTS
317303
"Set up the Acts target(s) explicitly" TRUE )

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ cmake --build build/
242242
| TRACCC_BUILD_TESTING | Build the (unit) tests of traccc |
243243
| TRACCC_BUILD_EXAMPLES | Build the examples of traccc |
244244
| TRACCC_USE_SYSTEM_VECMEM | Pick up an existing installation of VecMem from the build environment |
245-
| TRACCC_USE_SYSTEM_DETRAY | Pick up an existing installation of Detray from the build environment |
246245
| TRACCC_USE_SYSTEM_ACTS | Pick up an existing installation of Acts from the build environment |
247246
| TRACCC_USE_SYSTEM_GOOGLETEST | Pick up an existing installation of GoogleTest from the build environment |
248247
| TRACCC_USE_ROOT | Build physics performance analysis code using an existing installation of ROOT from the build environment |

extern/acts/CMakeLists.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ cmake_minimum_required( VERSION 3.25 )
99
include( FetchContent )
1010

1111
# Tell the user what's happening.
12-
message( STATUS "Building Acts as part of the TRACCC project" )
12+
message( STATUS "Building Acts (including Detray) as part of the TRACCC project" )
1313

1414
# Declare where to get Acts from.
1515
set( TRACCC_ACTS_SOURCE
16-
"URL;https://github.com/acts-project/acts/archive/refs/tags/v46.0.0.tar.gz;URL_MD5;1e0cc5c3db1b5605c792b66a366de6d1"
16+
"URL;https://github.com/acts-project/acts/archive/refs/tags/v46.5.0.tar.gz;URL_MD5;3c9901b3e624f19aeb90ee251d93e717"
1717
CACHE STRING "Source for Acts, when built as part of this project" )
1818
mark_as_advanced( TRACCC_ACTS_SOURCE )
1919
FetchContent_Declare( Acts SYSTEM ${TRACCC_ACTS_SOURCE} )
@@ -28,3 +28,21 @@ set( ACTS_BUILD_PLUGIN_JSON TRUE CACHE BOOL
2828

2929
# Get it into the current directory.
3030
FetchContent_MakeAvailable( Acts )
31+
32+
# The ITk metadata is required, so explicitly request that it be built.
33+
if (NOT("itk_metadata" IN_LIST DETRAY_GENERATE_METADATA))
34+
list(APPEND DETRAY_GENERATE_METADATA "itk_metadata")
35+
endif()
36+
37+
# HACK: This is not the most elegant solution. Ideally, ACTS would have a flag
38+
# to export the targets contained within the Detray/ directory, but currently
39+
# it does not. Thus, we use the downloaded copy of ACTS and find the Detray/
40+
# directory inside of it. Temporary solution.
41+
set(DETRAY_BUILD_TEST_UTILS TRUE CACHE BOOL "")
42+
FetchContent_Declare( Detray )
43+
set(FETCHCONTENT_SOURCE_DIR_DETRAY
44+
"${acts_SOURCE_DIR}/Detray/"
45+
CACHE STRING
46+
""
47+
)
48+
FetchContent_MakeAvailable(Detray SYSTEM)

extern/detray/CMakeLists.txt

Lines changed: 0 additions & 67 deletions
This file was deleted.

extern/detray/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)