Skip to content

Commit

Permalink
thisREST.cmake identifying if we are using CVMFS LCG setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalan committed Jul 14, 2024
1 parent 5d579f3 commit 5700bf6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions cmake/thisREST.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Write thisREST.[c]sh to INSTALL directory

##### Checking if we are using CVMFS LCG GCC11 environment
set(lcg_found FALSE)

# Check if the CMAKE_COMMAND contains both "cvmfs", "lcg" and "x86_64-el9-gcc11"
string(FIND "${CMAKE_COMMAND}" "cvmfs" cvmfs_pos)
string(FIND "${CMAKE_COMMAND}" "lcg" lcg_pos)
string(FIND "${CMAKE_COMMAND}" "x86_64-el9-gcc11" gcc_pos)

if (lcg_pos GREATER -1 AND cvmfs_pos GREATER -1 AND gcc_pos GREATER -1)
set(lcg_found TRUE)
endif()

# We identify the thisroot.sh script for the corresponding ROOT version
execute_process(
COMMAND root-config --prefix
Expand Down Expand Up @@ -28,8 +40,8 @@ if (${REST_G4} MATCHES "ON")
endif ()

set(loadLCG "")
if( ${REST_LCG} MATCHES "ON" )
set(loadG4
if( lcg_found )
set(loadLCG
"\# REST_LCG was enabled. We load LCG_104 environment.\nsource /cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-el9-gcc11-opt/setup.sh\n\n")
endif()

Expand Down

0 comments on commit 5700bf6

Please sign in to comment.