Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
np
nptool
Commits
a1dce2d2
Commit
a1dce2d2
authored
1 year ago
by
GIRARD ALCINDOR Valérian
Browse files
Options
Downloads
Patches
Plain Diff
Fixing my fix of Root.cmake ...
parent
0bf41bfc
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#285932
passed
1 year ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPLib/ressources/CMake/Root.cmake
+6
-4
6 additions, 4 deletions
NPLib/ressources/CMake/Root.cmake
with
6 additions
and
4 deletions
NPLib/ressources/CMake/Root.cmake
+
6
−
4
View file @
a1dce2d2
...
...
@@ -15,7 +15,7 @@ if(NPTOOL_ROOT_CONFIG MATCHES "NOTFOUND")
message
(
FATAL_ERROR
"ROOT is not found, check your installation"
)
endif
()
execute_process
(
COMMAND
"
${
NPTOOL_ROOT_CONFIG
}
ARGS
\
"
--version
\
"
OUTPUT_VARIABLE NPTOOL_ROOT_VERSION
"
)
execute_process
(
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND
${
NPTOOL_ROOT_CONFIG
}
"--version"
OUTPUT_VARIABLE NPTOOL_ROOT_VERSION
)
# now parse the parts of the user given version string into variables
string
(
REGEX REPLACE
"^([0-9]+)
\\
.[0-9][0-9]+
\\
/[0-9][0-9]+"
"
\\
1"
req_root_major_vers
"
${
ROOT_MIN_VERSION
}
"
)
string
(
REGEX REPLACE
"^[0-9]+
\\
.([0-9][0-9])+
\\
/[0-9][0-9]+.*"
"
\\
1"
req_root_minor_vers
"
${
ROOT_MIN_VERSION
}
"
)
...
...
@@ -39,15 +39,17 @@ endif()
set
(
ROOT_LIBRARIES dl Gui Core RIO Net Hist Gpad Tree Physics MathCore Thread ASImage
)
# Lib directories
execute_process
(
COMMAND
"
${
NPTOOL_ROOT_CONFIG
}
ARGS
\
"
--libdir
\
"
OUTPUT_VARIABLE ROOT_LIBRARY_DIR
"
)
execute_process
(
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND
${
NPTOOL_ROOT_CONFIG
}
"--libdir"
OUTPUT_VARIABLE ROOT_LIBRARY_DIR
)
link_directories
(
${
ROOT_LIBRARY_DIR
}
)
# Include directories
execute_process
(
COMMAND
"
${
NPTOOL_ROOT_CONFIG
}
ARGS
\
"
--incdir
\
"
OUTPUT_VARIABLE ROOT_INCLUDE_DIR
"
)
execute_process
(
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND
${
NPTOOL_ROOT_CONFIG
}
"--incdir"
OUTPUT_VARIABLE ROOT_INCLUDE_DIR
)
include_directories
(
SYSTEM
${
ROOT_INCLUDE_DIR
}
)
message
(
${
ROOT_INCLUDE_DIR
}
)
# Get the compilator flag from root to assure consistancy
execute_process
(
COMMAND
"
${
NPTOOL_ROOT_CONFIG
}
ARGS
\"
--cflags
\"
OUTPUT_VARIABLE NPTOOL_ROOT_CFLAGS"
)
execute_process
(
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND
${
NPTOOL_ROOT_CONFIG
}
"--cflags"
OUTPUT_VARIABLE NPTOOL_ROOT_CFLAGS
)
message
(
${
NPTOOL_ROOT_CFLAGS
}
)
if
(
CMAKE_CXX_FLAGS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
NPTOOL_ROOT_CFLAGS
}
"
)
else
()
...
...
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