From 046d23b312487e728a5c80b01f3e35bb351c4791 Mon Sep 17 00:00:00 2001 From: Javier Galan Date: Sun, 5 Nov 2023 16:16:57 +0100 Subject: [PATCH 1/3] Adding CRY to LD_LIBRARY_PATH inside thisREST.sh --- cmake/thisREST.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/thisREST.cmake b/cmake/thisREST.cmake index 54566035d..705e3b93f 100644 --- a/cmake/thisREST.cmake +++ b/cmake/thisREST.cmake @@ -34,6 +34,12 @@ else () set(loadMPFR "") endif () +if (DEFINED REST_CRY_PATH) + set(loadCRY "export LD_LIBRARY_PATH=${REST_CRY_PATH}/lib:\$LD_LIBRARY_PATH") +else () + set(loadCRY "") +endif () + set(loadGarfield "") set(Garfield_INCLUDE_ENV "") if (${REST_GARFIELD} MATCHES "ON") @@ -111,6 +117,7 @@ fi ${loadG4} ${loadMPFR} +${loadCRY} ${loadGarfield} if [ \\\$REST_PATH ] ; then From 159449a8632e6e5fc796243bc320405cda882115 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:30:16 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cmake/thisREST.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/thisREST.cmake b/cmake/thisREST.cmake index 705e3b93f..9f9aadb54 100644 --- a/cmake/thisREST.cmake +++ b/cmake/thisREST.cmake @@ -35,9 +35,9 @@ else () endif () if (DEFINED REST_CRY_PATH) - set(loadCRY "export LD_LIBRARY_PATH=${REST_CRY_PATH}/lib:\$LD_LIBRARY_PATH") + set(loadCRY "export LD_LIBRARY_PATH=${REST_CRY_PATH}/lib:\$LD_LIBRARY_PATH") else () - set(loadCRY "") + set(loadCRY "") endif () set(loadGarfield "") From b2ee50a6e7ac93630bc217f799d130ed5978ae52 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Mon, 6 Nov 2023 10:37:49 -0600 Subject: [PATCH 3/3] unified style for conditional definitions --- cmake/thisREST.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cmake/thisREST.cmake b/cmake/thisREST.cmake index 9f9aadb54..2e37cc4b3 100644 --- a/cmake/thisREST.cmake +++ b/cmake/thisREST.cmake @@ -16,6 +16,8 @@ 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/") @@ -23,21 +25,16 @@ if (${REST_G4} MATCHES "ON") "\# 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 "")