@@ -69,10 +69,11 @@ set_property(
6969 PROPERTY STRINGS "NONE" "WARNING" "INFO" "VERBOSE" "DEBUG"
7070)
7171option (DETRAY_BUILD_CLI_TOOLS "Build the command line tools of Detray" OFF )
72- option (
73- DETRAY_BUILD_PYTHON_BINDINGS
74- "Build python bindings for all enabled components"
75- OFF
72+ # Which detector metadata headers to generate during the build
73+ set (DETRAY_GENERATE_METADATA
74+ ""
75+ CACHE STRING
76+ "Semicolon-separated list of metdata generator scripts to run in this build"
7677)
7778
7879# Device compilation
@@ -90,6 +91,7 @@ option(DETRAY_BUILD_SYCL "Build the SYCL sources included in detray" OFF)
9091
9192# Check if HIP is available
9293option (DETRAY_BUILD_HIP "Build the HIP sources included in detray" OFF )
94+
9395cmake_dependent_option (
9496 DETRAY_BUILD_HOST
9597 "Build the host sources included in detray"
@@ -138,22 +140,6 @@ elseif(DETRAY_SET_LOGGING STREQUAL "DEBUG")
138140 set (DETRAY_LOG_LVL 3 CACHE INTERNAL "Print expert information" FORCE )
139141endif ()
140142
141- #
142- # Resolve build options and option dependencies
143- #
144-
145- # Set the internal log level from user input
146- set (DETRAY_LOG_LVL -1 CACHE INTERNAL "Disable logging" )
147- if (DETRAY_SET_LOGGING STREQUAL "WARN" )
148- set (DETRAY_LOG_LVL 0 CACHE INTERNAL "Print warnings and errors" FORCE )
149- elseif (DETRAY_SET_LOGGING STREQUAL "INFO" )
150- set (DETRAY_LOG_LVL 1 CACHE INTERNAL "Print general information" FORCE )
151- elseif (DETRAY_SET_LOGGING STREQUAL "VERBOSE" )
152- set (DETRAY_LOG_LVL 2 CACHE INTERNAL "Print detailed information" FORCE )
153- elseif (DETRAY_SET_LOGGING STREQUAL "DEBUG" )
154- set (DETRAY_LOG_LVL 3 CACHE INTERNAL "Print expert information" FORCE )
155- endif ()
156-
157143# Need test utils in CLI tools for the example detector generation
158144if (DETRAY_BUILD_CLI_TOOLS)
159145 set (DETRAY_BUILD_TEST_UTILS ON )
@@ -167,9 +153,12 @@ if(${DETRAY_BUILD_CUDA} AND ${CMAKE_CUDA_STANDARD} LESS 20)
167153 )
168154endif ()
169155
170- #
171- # Configure dependencies
172- #
156+ if (${DETRAY_BUILD_SYCL} AND ${CMAKE_SYCL_STANDARD} LESS 20)
157+ message (
158+ SEND_ERROR
159+ "CMAKE_SYCL_STANDARD=${CMAKE_SYCL_STANDARD} , but detray requires C++>=20"
160+ )
161+ endif ()
173162
174163if (${DETRAY_BUILD_HIP} AND ${CMAKE_HIP_STANDARD} LESS 20)
175164 message (
502491 add_subdirectory (tests )
503492endif ()
504493
494+ # Set up the tutorial(s).
505495if (DETRAY_BUILD_TUTORIALS)
506496 add_subdirectory (tutorials )
507497endif ()
0 commit comments