[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-432-g052d75a

Brad King brad.king at kitware.com
Mon Mar 3 10:03:19 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  052d75a682957825b815972d0d5a093b059ed089 (commit)
       via  3816cd2dc7a7cc220e4f1b1e87fee986545b9cb3 (commit)
      from  80c49a61a644e1445d4a49968d1f7b0b9da65c50 (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=052d75a682957825b815972d0d5a093b059ed089
commit 052d75a682957825b815972d0d5a093b059ed089
Merge: 80c49a6 3816cd2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 3 10:03:18 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 3 10:03:18 2014 -0500

    Merge topic 'different-python-header-libs-exe-0013794' into next
    
    3816cd2d FindPythonLibs: Find consistent Python interp, headers, libs (#13794)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3816cd2dc7a7cc220e4f1b1e87fee986545b9cb3
commit 3816cd2dc7a7cc220e4f1b1e87fee986545b9cb3
Author:     Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Wed Feb 26 21:47:20 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Mar 3 10:02:35 2014 -0500

    FindPythonLibs: Find consistent Python interp, headers, libs (#13794)
    
    When possible, get consistent version of the Python interpreter, headers path,
    and library.
    
    Now 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-Author: Adam Wolf
    Co-Author: 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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list