]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
explictly call find_package(PythonInterp) first to fix build err 12385/head
authorYixun Lan <dlan@gentoo.org>
Thu, 8 Dec 2016 07:25:14 +0000 (15:25 +0800)
committerYixun Lan <dlan@gentoo.org>
Thu, 8 Dec 2016 07:25:14 +0000 (15:25 +0800)
this is an un-modified message from dev-util/cmake-3.7.1
/usr/share/cmake/Modules/FindPythonLibs.cmake

call ``find_package(PythonInterp)`` first to
 get the currently active Python version by default with a consistent
version  of PYTHON_LIBRARIES.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
the detail error message we've met here

Found PythonInterp: python (found suitable version "2.7.12", minimum required is "2")
CMake Error at /usr/share/cmake/Modules/FindPythonLibs.cmake:54 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  src/CMakeLists.txt:209 (find_package)

CMakeLists.txt

index c70e6648a1389c1aa6cbec646aceba3a511a7b8c..8eb749127ee72efd038aaece904720b22bf2204f 100644 (file)
@@ -348,6 +348,7 @@ option(WITH_CEPHFS "CephFS is enabled" ON)
 option(WITH_MGR "ceph-mgr is enabled" ON)
 if(WITH_MGR)
     set(Python_ADDITIONAL_VERSIONS 2.7)
+    find_package(PythonInterp 2.7 REQUIRED)
     find_package(PythonLibs 2.7 REQUIRED)
     # Boost dependency check deferred to Boost section
 endif(WITH_MGR)