Skip to content

Commit

Permalink
unified style for conditional definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Nov 6, 2023
1 parent 159449a commit b2ee50a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cmake/thisREST.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +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")
else ()
set(loadCRY "")
endif ()

set(loadGarfield "")
Expand Down

0 comments on commit b2ee50a

Please sign in to comment.