[Cmake-commits] CMake branch, next, updated. v2.8.12.2-1818-gb18cb5a
Matt McCormick
matt.mccormick at kitware.com
Thu Feb 27 13:04:16 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b18cb5acb5b1a094e46457514f7bf02cb3b9b735 (commit)
via 6b47af939d49c22178f7e841bbaaea73aae1ed25 (commit)
from 8c2a1f91d3625a3afdf667a9d7507c357059a0e1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b18cb5acb5b1a094e46457514f7bf02cb3b9b735
commit b18cb5acb5b1a094e46457514f7bf02cb3b9b735
Merge: 8c2a1f9 6b47af9
Author: Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Thu Feb 27 13:04:15 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 27 13:04:15 2014 -0500
Merge topic 'different-python-header-libs-exe-0013794' into next
6b47af93 BUG: Find consistent Python interp, headers, libs #0013794
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b47af939d49c22178f7e841bbaaea73aae1ed25
commit 6b47af939d49c22178f7e841bbaaea73aae1ed25
Author: Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Wed Feb 26 21:47:20 2014 -0500
Commit: Matt McCormick <matt.mccormick at kitware.com>
CommitDate: Thu Feb 27 11:36:46 2014 -0500
BUG: Find consistent Python interp, headers, libs #0013794
When possible, get consistent version of the Python interpreter, headers path,
and library.
find_package(PythonLibs) internally calls find_package(PythonInterp QUIET) and
uses the resulting PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR to prefer
these versions when looking for the header path and library.
The Python_ADDITIONAL_VERSIONS variable has priority over the interpreter
version.
Co-authored-by: Adam Wolf
Co-authored-by: Gert Wollny <gw.fossdev at gmail.com>
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 0749efc..27d9e45 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -80,10 +80,15 @@ endif()
# Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front.
-set(_Python_VERSIONS
- ${Python_ADDITIONAL_VERSIONS}
- ${_PYTHON_FIND_OTHER_VERSIONS}
- )
+# If FindPythonInterp has already found the major and minor version,
+# insert that version between the user supplied versions and the stock
+# version list.
+find_package(PythonInterp QUIET)
+set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS})
+if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR)
+ list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+endif()
+list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS})
unset(_PYTHON_FIND_OTHER_VERSIONS)
unset(_PYTHON1_VERSIONS)
-----------------------------------------------------------------------
Summary of changes:
Modules/FindPythonLibs.cmake | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list