[Cmake-commits] CMake branch, next, updated. v3.7.0-1402-g58f56ee

Brad King brad.king at kitware.com
Tue Nov 29 09:11:11 EST 2016


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  58f56ee84fbb17c75eabff3410b8f5b3e56721cb (commit)
       via  9db0dfd75861aeb40433ad8a566c2a5900976659 (commit)
      from  1059d4176862fd8fac8ecc66c1b56eeadf4cd07c (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58f56ee84fbb17c75eabff3410b8f5b3e56721cb
commit 58f56ee84fbb17c75eabff3410b8f5b3e56721cb
Merge: 1059d41 9db0dfd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 29 09:11:11 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 29 09:11:11 2016 -0500

    Merge topic 'FindPythonLibs-tolerate-relative-exe' into next
    
    9db0dfd7 FindPythonLibs: Tolerate a non-absolute PYTHON_EXECUTABLE


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9db0dfd75861aeb40433ad8a566c2a5900976659
commit 9db0dfd75861aeb40433ad8a566c2a5900976659
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 28 12:46:10 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 28 12:49:02 2016 -0500

    FindPythonLibs: Tolerate a non-absolute PYTHON_EXECUTABLE
    
    The `PYTHON_EXECUTABLE` variable normally contains an absolute path, but
    tolerate cases when it does not without calling `get_filename_component`
    with an incorrect number of arguments.
    
    Closes: #16452

diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 1ebbf29..cd623cf 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -42,16 +42,16 @@
 
 # Use the executable's path as a hint
 set(_Python_LIBRARY_PATH_HINT)
-if(PYTHON_EXECUTABLE)
+if(IS_ABSOLUTE "${PYTHON_EXECUTABLE}")
   if(WIN32)
-    get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
+    get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH)
     if(_Python_PREFIX)
       set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs)
     endif()
     unset(_Python_PREFIX)
   else()
-    get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
-    get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH)
+    get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH)
+    get_filename_component(_Python_PREFIX "${_Python_PREFIX}" PATH)
     if(_Python_PREFIX)
       set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/lib)
     endif()

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

Summary of changes:
 Modules/FindPythonLibs.cmake |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list