Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rest-for-physics
framework
Commits
39e18ced
Commit
39e18ced
authored
8 months ago
by
Javier Galan
Browse files
Options
Downloads
Plain Diff
Merge branch 'jgalan_lcg' of github.com:rest-for-physics/framework into jgalan_lcg
parents
f9627ebe
f6c061cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/thisREST.cmake
+21
-19
21 additions, 19 deletions
cmake/thisREST.cmake
with
21 additions
and
19 deletions
cmake/thisREST.cmake
+
21
−
19
View file @
39e18ced
# Write thisREST.[c]sh to INSTALL directory
# Check if the LCG environment was loaded. Then it will be sourced in thisREST.sh
# Check if the LCG environment was loaded. Then it will be sourced in
# thisREST.sh
set
(
loadLCG
""
)
if
(
DEFINED ENV{LCG_VERSION}
)
if
(
DEFINED ENV{LCG_VERSION}
)
# Retrieve the value of the environment variable
set
(
LCG_VERSION $ENV{LCG_VERSION}
)
set
(
LCG_VERSION $ENV{LCG_VERSION}
)
# Print the value of the environment variable in CMake
message
(
STATUS
"Found LCG environment! Version:
${
LCG_VERSION
}
"
)
message
(
STATUS
"Found LCG environment! Version:
${
LCG_VERSION
}
"
)
set
(
C_INCLUDE_PATH
"$ENV{C_INCLUDE_PATH}"
)
set
(
C_INCLUDE_PATH
"$ENV{C_INCLUDE_PATH}"
)
string
(
FIND
"
${
C_INCLUDE_PATH
}
"
":"
COLON_POSITION
)
string
(
FIND
"
${
C_INCLUDE_PATH
}
"
":"
COLON_POSITION
)
if
(
COLON_POSITION GREATER_EQUAL 0
)
# Extract the substring from the beginning up to the position of the first ':'
string
(
SUBSTRING
"
${
C_INCLUDE_PATH
}
"
0
"
${
COLON_POSITION
}
"
C_CLEAN
)
else
()
# If ':' is not found, use the entire string
set
(
C_CLEAN
"
${
C_INCLUDE_PATH
}
"
)
endif
()
if
(
COLON_POSITION GREATER_EQUAL 0
)
# Extract the substring from the beginning up to the position of the
# first ':'
string
(
SUBSTRING
"
${
C_INCLUDE_PATH
}
"
0
"
${
COLON_POSITION
}
"
C_CLEAN
)
else
()
# If ':' is not found, use the entire string
set
(
C_CLEAN
"
${
C_INCLUDE_PATH
}
"
)
endif
()
string
(
REPLACE
"include"
"setup.sh"
LCG_SETUP
"
${
C_CLEAN
}
"
)
string
(
REPLACE
"include"
"setup.sh"
LCG_SETUP
"
${
C_CLEAN
}
"
)
# Print the modified string
message
(
STATUS
"Original path:
${
C_CLEAN
}
"
)
message
(
STATUS
"Modified path:
${
LCG_SETUP
}
"
)
# Print the modified string
message
(
STATUS
"Original path:
${
C_CLEAN
}
"
)
message
(
STATUS
"Modified path:
${
LCG_SETUP
}
"
)
set
(
loadLCG
"
\#
We load the LCG_
${
LCG_VERSION
}
environment.
\n
echo
\"
Loading
\
LCG_
${
LCG_VERSION
}
\
environment
\"\n
source
${
LCG_SETUP
}
\n
"
"
\#
We load the LCG_
${
LCG_VERSION
}
environment.
\n
echo
\"
Loading
\
LCG_
${
LCG_VERSION
}
\
environment
\"\n
source
${
LCG_SETUP
}
\n
"
)
endif
()
endif
()
# We identify the thisroot.sh script for the corresponding ROOT version
execute_process
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment