Skip to content
Snippets Groups Projects
Commit efa05177 authored by Markus Frank's avatar Markus Frank Committed by MarkusFrankATcernch
Browse files

Fix cmake bugs introduced to build examples with Geant4 builtin CLHEP

parent 862adb22
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ dd4hep_configure_output() ...@@ -41,7 +41,7 @@ dd4hep_configure_output()
SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDB DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector" SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDB DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector"
CACHE STRING "List of DD4hep Examples to build") CACHE STRING "List of DD4hep Examples to build")
SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES) SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES)
MESSAGE(STATUS "Will be building these examples: ${DD4HEP_BUILD_EXAMPLES}") MESSAGE(STATUS "Will be building these examples: ${DD4HEP_EXAMPLES}")
FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES) FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES)
dd4hep_print("|> Building ${DDExample}") dd4hep_print("|> Building ${DDExample}")
......
...@@ -22,20 +22,17 @@ IF(NOT TARGET DD4hep::DDCore) ...@@ -22,20 +22,17 @@ IF(NOT TARGET DD4hep::DDCore)
ENDIF() ENDIF()
dd4hep_set_compiler_flags() dd4hep_set_compiler_flags()
#
#========================================================================== #==========================================================================
set (Geant4_builtin_clhep_FOUND ON) # Configure Geant4 to if we have a builtin CLHEP
# Configure Geant4
if(DD4HEP_USE_GEANT4) if(DD4HEP_USE_GEANT4)
find_package( Geant4 REQUIRED ) find_package( Geant4 REQUIRED )
if(NOT Geant4_builtin_clhep_FOUND) if(Geant4_builtin_clhep_FOUND)
SET(DD4HEP_USE_CLHEP TRUE)
else()
include_directories(${Geant4_INCLUDE_DIRS}) include_directories(${Geant4_INCLUDE_DIRS})
DD4HEP_SETUP_GEANT4_TARGETS()
endif() endif()
dd4hep_print("|++> Setup Geant4 targets.")
DD4HEP_SETUP_GEANT4_TARGETS()
endif() endif()
#
# CLHEP dependent stuff # CLHEP dependent stuff
if(NOT TARGET CLHEP::CLHEP) if(NOT TARGET CLHEP::CLHEP)
# ensure we only look for CLHEP once # ensure we only look for CLHEP once
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment