Skip to content
Snippets Groups Projects
Commit 816cea94 authored by Marilena Bandieramonte's avatar Marilena Bandieramonte
Browse files

Merge branch 'fixCMakeExamples' into 'main'

CMakeLists: properly handle the GEOMODEL_BUILD_EXAMPLES_W_GEANT4 option

See merge request !259
parents 0a677daf 721b9d80
No related branches found
No related tags found
1 merge request!259CMakeLists: properly handle the GEOMODEL_BUILD_EXAMPLES_W_GEANT4 option
Pipeline #6780458 passed with warnings
...@@ -29,13 +29,13 @@ if( APPLE ) ...@@ -29,13 +29,13 @@ if( APPLE )
endif() endif()
# === Externally provided content === # === Externally provided content ===
# Set up how the project handle some of its dependenices. Either by picking them # Set up how the project handle some of its dependenices. Either by ing them
# up from the environment, or building them itself. # up from the environment, or building them itself.
include( SetupEigen3 ) include( SetupEigen3 )
include( SetupXercesC ) include( SetupXercesC )
include( SetupJSON ) include( SetupJSON )
# Find the dependencies that the project always picks up from its environment. # Find the dependencies that the project always s up from its environment.
find_package( SQLite3 3.7.17 ) find_package( SQLite3 3.7.17 )
...@@ -133,8 +133,15 @@ if(GEOMODEL_BUILD_ATLASEXTENSIONS) ...@@ -133,8 +133,15 @@ if(GEOMODEL_BUILD_ATLASEXTENSIONS)
endif() endif()
endif() endif()
if(GEOMODEL_BUILD_GEOMODELG4 OR GEOMODEL_BUILD_EXAMPLES_W_GEANT4) if(GEOMODEL_BUILD_GEOMODELG4)
add_subdirectory(GeoModelG4) add_subdirectory(GeoModelG4)
if(GEOMODEL_BUILD_EXAMPLES AND GEOMODEL_BUILD_EXAMPLES_W_GEANT4)
message(STATUS "==> NOTE: You enabled both GEOMODEL_BUILD_EXAMPLES and GEOMODEL_BUILD_EXAMPLES_W_GEANT4. Since GEOMODEL_BUILD_EXAMPLES triggers the build of the GEOMODEL_BUILD_EXAMPLES_W_GEANT4 as well, I set GEOMODEL_BUILD_EXAMPLES_W_GEANT4 to FALSE to avoid errors of 'double inclusion'")
set(GEOMODEL_BUILD_EXAMPLES_W_GEANT4 FALSE)
elseif (GEOMODEL_BUILD_EXAMPLES_W_GEANT4)
add_subdirectory(GeoModelExamples)
list( APPEND BUILT_PACKAGES "GeoModelExamples")
endif()
list( APPEND BUILT_PACKAGES "GeoModelG4") list( APPEND BUILT_PACKAGES "GeoModelG4")
endif() endif()
......
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