Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
2a0757bf
Commit
2a0757bf
authored
12 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
make sure found python lib/binaries match
parent
7620bc75
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake_support/FindPython.cmake
+9
-2
9 additions, 2 deletions
cmake_support/FindPython.cmake
with
9 additions
and
2 deletions
cmake_support/FindPython.cmake
+
9
−
2
View file @
2a0757bf
...
...
@@ -118,8 +118,11 @@ macro(check_for_python_binary)
foreach
(
_VERSION
${
PYTHON_VERSIONS
}
)
if
(
${
PYTHON_MIN_VERSION
}
VERSION_LESS
${
_VERSION
}
)
_find_python_bin
(
"
${
PYTHON_ROOT
}
"
"
${
_VERSION
}
"
)
if
(
PYTHON_
LIBRARIES
)
if
(
PYTHON_
BINARY
)
set
(
PYTHON_VERSION
"
${
_VERSION
}
"
)
# disallow all versions except for the one we just found. This makes
# sure we don't mismatch the python binary and the libraries.
set
(
PYTHON_VERSIONS
"
${
_VERSION
}
"
)
break
()
endif
()
endif
()
...
...
@@ -141,11 +144,13 @@ if(APPLE AND NOT PYTHON_IGNORE_FRAMEWORKS)
check_for_python_framework
()
endif
()
# first check for python binary.
check_for_python_binary
()
if
(
NOT PYTHON_FRAMEWORK_FOUND
)
check_for_python_lib
()
endif
()
check_for_python_binary
()
mark_as_advanced
(
PYTHON_LIBRARIES
PYTHON_INCLUDE_PATH
...
...
@@ -166,6 +171,8 @@ if(PYTHON_LIBRARIES)
endif
()
if
(
PYTHON_BINARY
)
set
(
PYTHON_VERSION
"
${
PYTHON_VERSION
}
"
CACHE STRING
"Python Version"
FORCE
)
set
(
PYTHON_BINARY
"
${
PYTHON_BINARY
}
"
CACHE FILEPATH
"Python Binary"
FORCE
)
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