Skip to content

Export required flags for VecGeom as compile options

Benjamin Morgan requested to merge bmorgan/export-public-compile-options into master

Identified in upstream use by Geant4 - required compiler flags for using VecGeom (ISA and alignment) are not exported as CMake usage requirements for the imported targets. The client is required to use the CMake variables set in VecGeomConfig.cmake, and this may not be obvious or always done.

Add the required flags to the VecGeom target as CMake compile options so they are propagated to clients linking the imported target.

NB: These flags currently must be added to VecGeom's build-time CMAKE_CXX_FLAGS as well to support CUDA builds. This leads to repitition of the flags on the compile command line, but there should be no side effects as the flags used do not change behaviour when repeated.

Merge request reports