Export CMake cache variables with VecGeomConfig
Currently some VecGeom options (such as single precision) aren't knowable by downstream packages such as Celeritas. This adds some code (adapted from the Celeritas cmake) that writes out cache variables which start with VECGEOM_
, but renaming them to have consistent capitalization VecGeom
. It additionally exports _DIR
hints for finding upstream packages.
This can be backported to the 1.x branch.
# Configuration options
set(VecGeom_BACKEND "Scalar")
set(VecGeom_BUILTIN_VECCORE "OFF")
set(VecGeom_DISTANCE_DEBUG "OFF")
set(VecGeom_EMBREE "OFF")
set(VecGeom_ENABLE_CUDA "OFF")
set(VecGeom_ERROR_LIMIT "20")
set(VecGeom_FAST_MATH "OFF")
set(VecGeom_GDML "ON")
set(VecGeom_GDMLDEBUG "OFF")
set(VecGeom_GEANT4 "OFF")
set(VecGeom_INPLACE_TRANSFORMATIONS "ON")
set(VecGeom_NO_SPECIALIZATION "ON")
set(VecGeom_PLANESHELL "ON")
set(VecGeom_QUADRILATERAL_ACCELERATION "ON")
set(VecGeom_ROOT "OFF")
set(VecGeom_SINGLE_PRECISION "OFF")
set(VecGeom_TEST_BENCHMARK "OFF")
set(VecGeom_TEST_COVERAGE "OFF")
set(VecGeom_TEST_STATIC_ANALYSIS "OFF")
set(VecGeom_TEST_VALIDATION "OFF")
set(VecGeom_TEST_VTUNE "OFF")
set(VecGeom_USE_CACHED_TRANSFORMATIONS "OFF")
set(VecGeom_USE_INDEXEDNAVSTATES "ON")
set(VecGeom_USE_NAVINDEX "OFF")
set(VecGeom_USE_SURF "ON")
set(VecGeom_VECTOR "empty")
# Hints for upstream dependencies
if(NOT DEFINED VecCore_DIR)
set(VecCore_DIR "/opt/spack/opt/spack/sonoma/veccore/0.8.1/pdmogk7/lib/cmake/VecCore")
endif()
if(NOT DEFINED XercesC_INCLUDE_DIR)
set(XercesC_INCLUDE_DIR "/opt/spack/opt/spack/sonoma/xerces-c/3.2.4/75zddsm/include")
endif()