File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed
Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,19 @@ endif()
8787# In order to generate specializations for our kernels, we need to have both
8888# a working Python interpreter, and a list of supported detectors.
8989find_package (Python COMPONENTS Interpreter REQUIRED)
90- set (TRACCC_SUPPORTED_DETECTORS "default_detector;telescope_detector;toy_detector;itk_detector;odd_detector" )
90+
91+ # Need at least one detector type
92+ if (NOT TRACCC_SUPPORTED_DETECTORS OR TRACCC_BUILD_EXAMPLES)
93+ list (APPEND TRACCC_SUPPORTED_DETECTORS default_detector)
94+ endif ()
95+
96+ # Add the test detector types (default_detector is used for wire chamber)
97+ if (TRACCC_BUILD_TESTING)
98+ list (APPEND TRACCC_SUPPORTED_DETECTORS default_detector;telescope_detector;toy_detector;odd_detector)
99+ endif ()
100+
101+ list (REMOVE_DUPLICATES TRACCC_SUPPORTED_DETECTORS)
102+ list (JOIN TRACCC_SUPPORTED_DETECTORS ", " TRACCC_METADATA_LIST)
91103
92104# Set up build profiling for the project.
93105if ( CTEST_USE_LAUNCHERS )
Original file line number Diff line number Diff line change @@ -148,3 +148,7 @@ target_compile_definitions( traccc_core
148148# Set the algebra-plugins plugin to use.
149149message (STATUS "Building with plugin type: " ${TRACCC_ALGEBRA_PLUGINS} )
150150target_compile_definitions (traccc_core PUBLIC ALGEBRA_PLUGINS_INCLUDE_${TRACCC_ALGEBRA_PLUGINS} )
151+
152+ # Define the detector types to be built
153+ message (STATUS "Building with detector types: " ${TRACCC_METADATA_LIST} )
154+ #target_compile_definitions(traccc_core PUBLIC TRACCC_METADATA_LIST=${TRACCC_METADATA_LIST})
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ concept is_detector_traits = requires {
7777 typename T::buffer;
7878};
7979
80- // / Default detector (also used for ODD )
80+ // / Default detector (Can hold the data of any detector )
8181using default_detector =
8282 detector_traits<detray::default_metadata<traccc::default_algebra>>;
8383
@@ -93,10 +93,14 @@ using toy_detector =
9393using itk_detector =
9494 detector_traits<detray::itk_metadata<traccc::default_algebra>>;
9595
96- // / ITk detector
96+ // / ODD detector
9797using odd_detector =
9898 detector_traits<detray::odd_metadata<traccc::default_algebra>>;
9999
100- using detector_type_list = std::tuple<default_detector, telescope_detector,
101- itk_detector, odd_detector>;
100+ // The metadata list is generated during build configuration
101+ // using detector_type_list = std::tuple<TRACCC_METADATA_LIST>;
102+
103+ using detector_type_list = std::tuple<default_detector, toy_detector,
104+ telescope_detector, odd_detector>;
105+
102106} // namespace traccc
You can’t perform that action at this time.
0 commit comments