Commit 07f9c3ab authored by Paul Schütze's avatar Paul Schütze
Browse files

Merge branch 'b-geant4-comp' into 'v3.1-stable'

[v3.1-stable] CMake: Error out if required component is not found

See merge request allpix-squared/allpix-squared!1134
parents 565ddbff 6b9364b4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -385,6 +385,13 @@ MACRO(ALLPIX_MODULE_REQUIRE_GEANT4_INTERFACE name)
                            "$ source YOUR_GEANT4_DIR/bin/geant4.sh")
    ENDIF()

    FOREACH(component ${GEANT_COMPONENTS})
        IF(NOT ${Geant4_${component}_FOUND})
            MESSAGE(FATAL_ERROR "Could not find Geant4 component ${component}, make sure the installed Geant4 version"
                                "has this component available or switch off building this module")
        ENDIF()
    ENDFOREACH()

    # Add "geant4.sh" as runtime dependency for setup.sh file:
    ADD_RUNTIME_DEP(geant4.sh)