Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
d6f5a044
Commit
d6f5a044
authored
4 years ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
CMAKE: fix python finding for older cmakes
parent
61ec6740
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/DD4hepBuild.cmake
+9
-2
9 additions, 2 deletions
cmake/DD4hepBuild.cmake
with
9 additions
and
2 deletions
cmake/DD4hepBuild.cmake
+
9
−
2
View file @
d6f5a044
...
@@ -651,8 +651,15 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
...
@@ -651,8 +651,15 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
#Check if Python version detected matches the version used to build ROOT
#Check if Python version detected matches the version used to build ROOT
SET
(
Python_FIND_FRAMEWORK LAST
)
SET
(
Python_FIND_FRAMEWORK LAST
)
IF
((
TARGET ROOT::PyROOT OR TARGET ROOT::ROOTTPython
)
AND
${
ROOT_VERSION
}
VERSION_GREATER_EQUAL 6.19
)
IF
((
TARGET ROOT::PyROOT OR TARGET ROOT::ROOTTPython
)
AND
${
ROOT_VERSION
}
VERSION_GREATER_EQUAL 6.19
)
dd4hep_debug
(
"D++> Python version used for building ROOT
${
ROOT_PYTHON_VERSION
}
"
)
# cmake 3.17.1 doesn't include python patch level in PYTHON_VERSION
FIND_PACKAGE
(
Python
${
ROOT_PYTHON_VERSION
}
EXACT REQUIRED COMPONENTS Development
)
IF
(
CMAKE_VERSION VERSION_EQUAL 3.17.1
)
string
(
REGEX MATCH [23]\.[0-9]+ REQUIRE_PYTHON_VERSION
${
ROOT_PYTHON_VERSION
}
)
ELSE
()
SET
(
REQUIRE_PYTHON_VERSION
${
ROOT_PYTHON_VERSION
}
)
ENDIF
()
dd4hep_debug
(
"D++> Python version used for building ROOT
${
ROOT_PYTHON_VERSION
}
"
)
dd4hep_debug
(
"D++> Required python version
${
REQUIRE_PYTHON_VERSION
}
"
)
FIND_PACKAGE
(
Python
${
REQUIRE_PYTHON_VERSION
}
EXACT REQUIRED COMPONENTS Development
)
ELSE
()
ELSE
()
FIND_PACKAGE
(
Python COMPONENTS Development
)
FIND_PACKAGE
(
Python COMPONENTS Development
)
ENDIF
()
ENDIF
()
...
...
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