[Cmake-commits] CMake branch, next, updated. v2.8.7-2762-gae376fb

Rolf Eike Beer eike at sf-mail.de
Tue Feb 21 15:46:31 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  ae376fb0a499baf6e758ebfd1b71104069da700f (commit)
       via  810edef9d66bee2001d01ad34de90059f2f5d160 (commit)
       via  1f581c860dded4bcdc0a7dffa9f7e2d3ec25ac68 (commit)
       via  0793a28b1aa5d332eecfb90242ee5db8d032031c (commit)
       via  fffdbc1b871805ab617fd3de475477672ce5a4fa (commit)
       via  cffebe643c9002ee3411c8f293abdf7c23fc622c (commit)
      from  63152d002f40c9426845246aef04636ce416e72c (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=ae376fb0a499baf6e758ebfd1b71104069da700f
commit ae376fb0a499baf6e758ebfd1b71104069da700f
Merge: 63152d0 810edef
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Feb 21 15:46:25 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Feb 21 15:46:25 2012 -0500

    Merge topic 'improve-findpythonlibs' into next
    
    810edef FindPythonLibs: put debug libraries into PYTHON_LIBRARIES
    1f581c8 FindPythonLibs: get the exact version of the found library (#3080)
    0793a28 FindPythonLibs: make the version selection work as for PythonInterp
    fffdbc1 FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
    cffebe6 KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810edef9d66bee2001d01ad34de90059f2f5d160
commit 810edef9d66bee2001d01ad34de90059f2f5d160
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: Tue Feb 21 21:44:47 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=1f581c860dded4bcdc0a7dffa9f7e2d3ec25ac68
commit 1f581c860dded4bcdc0a7dffa9f7e2d3ec25ac68
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: Tue Feb 21 21:44:41 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=0793a28b1aa5d332eecfb90242ee5db8d032031c
commit 0793a28b1aa5d332eecfb90242ee5db8d032031c
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: Tue Feb 21 20:14:14 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=fffdbc1b871805ab617fd3de475477672ce5a4fa
commit fffdbc1b871805ab617fd3de475477672ce5a4fa
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: Tue Feb 21 20:14:14 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:
 Modules/FindPythonInterp.cmake    |    4 ++-
 Modules/FindPythonLibs.cmake      |   63 ++++++++++++++++++++++++++++++++----
 Source/kwsys/kwsysDateStamp.cmake |    2 +-
 3 files changed, 60 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list