[Cmake-commits] CMake branch, next, updated. v2.8.7-2321-g1c95304
Rolf Eike Beer
eike at sf-mail.de
Fri Jan 27 15:17:21 EST 2012
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 1c9530453535b6598047e2e50e2d4a3855174f2b (commit)
via bde7b5aafd5ab1ff180c900b0e473fc85bafa724 (commit)
from 003bbb688136ed732a36b1adb4f50324ab8e2462 (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=1c9530453535b6598047e2e50e2d4a3855174f2b
commit 1c9530453535b6598047e2e50e2d4a3855174f2b
Merge: 003bbb6 bde7b5a
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 27 15:17:20 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 27 15:17:20 2012 -0500
Merge topic 'more-python-version' into next
bde7b5a FindPythonInterp: try harder to get a version number
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bde7b5aafd5ab1ff180c900b0e473fc85bafa724
commit bde7b5aafd5ab1ff180c900b0e473fc85bafa724
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 27 21:15:53 2012 +0100
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Jan 27 21:15:53 2012 +0100
FindPythonInterp: try harder to get a version number
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index d5a2a5e..5c1d56b 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -88,8 +88,19 @@ endif()
# determine python version string
if(PYTHON_EXECUTABLE)
- execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version ERROR_VARIABLE _VERSION OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
- if(_VERSION MATCHES "^Python [0-9]+\\.[0-9]+.*")
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version
+ ERROR_VARIABLE _VERSION
+ RESULT_VARIABLE _PYTHON_VERSION_RESULT
+ OUTPUT_QUIET
+ ERROR_STRIP_TRAILING_WHITESPACE)
+ if(_PYTHON_VERSION_RESULT)
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -V
+ ERROR_VARIABLE _VERSION
+ RESULT_VARIABLE _PYTHON_VERSION_RESULT
+ OUTPUT_QUIET
+ ERROR_STRIP_TRAILING_WHITESPACE)
+ endif(_PYTHON_VERSION_RESULT)
+ if(NOT _PYTHON_VERSION_RESULT AND _VERSION MATCHES "^Python [0-9]+\\.[0-9]+.*")
string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}")
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}")
@@ -97,6 +108,8 @@ if(PYTHON_EXECUTABLE)
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}")
endif()
endif()
+ unset(_PYTHON_VERSION_RESULT)
+ unset(_VERSION)
endif(PYTHON_EXECUTABLE)
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
-----------------------------------------------------------------------
Summary of changes:
Modules/FindPythonInterp.cmake | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list