Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a check for the standard that Geant4 was compiled with #1191

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ if(DD4HEP_USE_GEANT4)
IF(NOT Geant4_builtin_clhep_FOUND)
SET(DD4HEP_USE_CLHEP TRUE)
ENDIF()
if(Geant4_CXX_STANDARD MATCHES "[0-9]+" AND Geant4_CXX_STANDARD LESS ${CMAKE_CXX_STANDARD})
message(FATAL_ERROR "Geant4 was compiled with C++${Geant4_CXX_STANDARD}, but DD4hep requires C++${CMAKE_CXX_STANDARD}")
endif()

DD4HEP_SETUP_GEANT4_TARGETS()
# Geant4 sets the CLHEP include directory to include_directories, we undo this here
# we don't do this inside DD4hep_SETUP_GEANT4_TARGETS, because that is also used in
Expand Down
Loading