From 4adb3c13b9f8a81e1027651defd5d9cee6664c8d Mon Sep 17 00:00:00 2001 From: Yixun Lan Date: Thu, 8 Dec 2016 15:25:14 +0800 Subject: [PATCH] explictly call find_package(PythonInterp) first to fix build err 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 --- 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c70e6648a13..8eb749127ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)