[Cmake-commits] CMake branch, next, updated. v2.8.7-2797-g15f77be

Rolf Eike Beer eike at sf-mail.de
Wed Feb 22 11:20:56 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  15f77be8b71be6cf3f41748d27054cd9525d5657 (commit)
       via  94a5ed5a59c58d1f3da4ce514b994c109a3832cb (commit)
       via  c9c1a176092593ce7c47e7a473e24363d9395c79 (commit)
       via  f7723786e7ecdd29a430df396d6cce64b9ccdcb6 (commit)
       via  bbddaeef7e2c65994812ccee0a92744f4777175c (commit)
       via  6a1c5a356911d3b75e60ecad86d7538e6de888f9 (commit)
      from  7815a1531d8dc1c290ed120955eb2f83270b3e99 (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=15f77be8b71be6cf3f41748d27054cd9525d5657
commit 15f77be8b71be6cf3f41748d27054cd9525d5657
Merge: 7815a15 94a5ed5
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Feb 22 11:20:48 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Feb 22 11:20:48 2012 -0500

    Merge topic 'improve-findpythonlibs' into next
    
    94a5ed5 FindPythonLibs: put debug libraries into PYTHON_LIBRARIES
    c9c1a17 FindPythonLibs: get the exact version of the found library (#3080)
    f772378 FindPythonLibs: make the version selection work as for PythonInterp
    bbddaee FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
    6a1c5a3 KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94a5ed5a59c58d1f3da4ce514b994c109a3832cb
commit 94a5ed5a59c58d1f3da4ce514b994c109a3832cb
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Feb 21 21:40:02 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Feb 22 17:20:15 2012 +0100

    FindPythonLibs: put debug libraries into PYTHON_LIBRARIES

diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 9401dbb..6360d53 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -7,7 +7,7 @@
 #  PYTHON_LIBRARIES           - path to the python library
 #  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
 #  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
-#  PYTHON_DEBUG_LIBRARIES     - path to the debug library
+#  PYTHON_DEBUG_LIBRARIES     - path to the debug library (deprecated)
 #  PYTHONLIBS_VERSION_STRING  - version of the Python libs found (since CMake 2.8.8)
 #
 # The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
@@ -148,9 +148,14 @@ MARK_AS_ADVANCED(
 # library. We now set the variables listed by the documentation for this
 # module.
 SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
 SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
 
+# These variables have been historically named in this module different from
+# what SELECT_LIBRARY_CONFIGURATIONS() expects.
+SET(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
+SET(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
 
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9c1a176092593ce7c47e7a473e24363d9395c79
commit c9c1a176092593ce7c47e7a473e24363d9395c79
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Feb 21 21:12:16 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Feb 22 17:20:15 2012 +0100

    FindPythonLibs: get the exact version of the found library (#3080)

diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 8ba2d39..9401dbb 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -8,6 +8,7 @@
 #  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
 #  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
 #  PYTHON_DEBUG_LIBRARIES     - path to the debug library
+#  PYTHONLIBS_VERSION_STRING  - version of the Python libs found (since CMake 2.8.8)
 #
 # The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
 # version numbers that should be taken into account when searching for Python.
@@ -126,6 +127,14 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
   SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
     "Path to where Python.h is found (deprecated)")
 
+  IF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+    FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
+         REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
+    STRING(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
+                         PYTHONLIBS_VERSION_STRING "${python_version_str}")
+    UNSET(python_version_str)
+  ENDIF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+
 ENDFOREACH(_CURRENT_VERSION)
 
 MARK_AS_ADVANCED(
@@ -144,8 +153,9 @@ SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
 
 
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
+                                  REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
+                                  VERSION_VAR PYTHONLIBS_VERSION_STRING)
 
 # PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
 # PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7723786e7ecdd29a430df396d6cce64b9ccdcb6
commit f7723786e7ecdd29a430df396d6cce64b9ccdcb6
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Feb 21 21:00:15 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Feb 22 17:20:15 2012 +0100

    FindPythonLibs: make the version selection work as for PythonInterp

diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 049a36f..8ba2d39 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -30,11 +30,42 @@ INCLUDE(CMakeFindFrameworks)
 # Search for the python framework on Apple.
 CMAKE_FIND_FRAMEWORKS(Python)
 
+SET(_PYTHON1_VERSIONS 1.6 1.5)
+SET(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
+SET(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
+
+IF(PythonLibs_FIND_VERSION)
+    IF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+        STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
+        STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
+        UNSET(_PYTHON_FIND_OTHER_VERSIONS)
+        IF(NOT PythonLibs_FIND_VERSION_EXACT)
+            FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
+                IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
+                    LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
+                ENDIF()
+             ENDFOREACH()
+        ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
+        UNSET(_PYTHON_FIND_MAJ_MIN)
+        UNSET(_PYTHON_FIND_MAJ)
+    ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+        SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
+    ENDIF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ELSE(PythonLibs_FIND_VERSION)
+    SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
+ENDIF(PythonLibs_FIND_VERSION)
+
 # 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
+SET(_Python_VERSIONS
   ${Python_ADDITIONAL_VERSIONS}
-  2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+  ${_PYTHON_FIND_OTHER_VERSIONS}
+  )
+
+UNSET(_PYTHON_FIND_OTHER_VERSIONS)
+UNSET(_PYTHON1_VERSIONS)
+UNSET(_PYTHON2_VERSIONS)
+UNSET(_PYTHON3_VERSIONS)
 
 FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
   STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbddaeef7e2c65994812ccee0a92744f4777175c
commit bbddaeef7e2c65994812ccee0a92744f4777175c
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Feb 21 20:52:27 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Feb 22 17:20:15 2012 +0100

    FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
    
    The current documentation could be read as if that variable is output from the
    module, which is nonsense.

diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 5c1d56b..930f675 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -10,7 +10,9 @@
 #  PYTHON_VERSION_MINOR       - Python minor version found e.g. 5
 #  PYTHON_VERSION_PATCH       - Python patch version found e.g. 2
 #
-#  Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
+# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
+# version numbers that should be taken into account when searching for Python.
+# You need to set this variable before calling find_package(PythonInterp).
 
 #=============================================================================
 # Copyright 2005-2010 Kitware, Inc.
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index da7a1ac..049a36f 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -8,7 +8,10 @@
 #  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
 #  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
 #  PYTHON_DEBUG_LIBRARIES     - path to the debug library
-#  Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
+#
+# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
+# version numbers that should be taken into account when searching for Python.
+# You need to set this variable before calling find_package(PythonLibs).
 
 #=============================================================================
 # Copyright 2001-2009 Kitware, Inc.

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/kwsysDateStamp.cmake |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list