Skip to content

Commit

Permalink
Merge pull request #489 from rest-for-physics/jgalan_cry
Browse files Browse the repository at this point in the history
Adding CRY to LD_LIBRARY_PATH inside thisREST.sh
  • Loading branch information
jgalan authored Nov 15, 2023
2 parents 8dc9f22 + f655b15 commit 41ac5d8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmake/thisREST.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ execute_process(
string(REGEX REPLACE "\n$" "" GEANT4_PATH "${GEANT4_PATH}")
get_filename_component(GEANT4_BIN_DIR "${GEANT4_PATH}/bin/" REALPATH)

set(g4LibPath "")
set(loadG4 "")
if (${REST_G4} MATCHES "ON")
# https://github.com/rest-for-physics/framework/issues/331
set(g4LibPath ":${GEANT4_PATH}/lib/")
set(loadG4
"\# if geant4.sh script is found we load the same Geant4 version as used in compilation\nif [[ -f \\\"${GEANT4_BIN_DIR}/geant4.sh\\\" ]]; then
[[ -n \\\"\\\${ZSH_VERSION}\\\" ]] && pushd ${GEANT4_BIN_DIR} > /dev/null\n source ${GEANT4_BIN_DIR}/geant4.sh\n [[ -n \\\"\\\${ZSH_VERSION}\\\" ]] && popd > /dev/null\nfi\n"
)
else ()
set(g4LibPath "")
set(loadG4 "")
endif (${REST_G4} MATCHES "ON")
endif ()

set(loadMPFR "")
if (DEFINED MPFR_PATH)
set(loadMPFR "export LD_LIBRARY_PATH=${MPFR_PATH}/lib:\$LD_LIBRARY_PATH")
else ()
set(loadMPFR "")
endif ()

set(loadCRY "")
if (DEFINED REST_CRY_PATH)
set(loadCRY "export LD_LIBRARY_PATH=${REST_CRY_PATH}/lib:\$LD_LIBRARY_PATH")
endif ()

set(loadGarfield "")
Expand Down Expand Up @@ -111,6 +114,7 @@ fi
${loadG4}
${loadMPFR}
${loadCRY}
${loadGarfield}
if [ \\\$REST_PATH ] ; then
Expand Down

0 comments on commit 41ac5d8

Please sign in to comment.