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

Adding CRY to LD_LIBRARY_PATH inside thisREST.sh #489

Merged
merged 4 commits into from
Nov 15, 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
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
Loading