]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: fix the include dir for building boost::python 20324/head
authorKefu Chai <kchai@redhat.com>
Mon, 5 Feb 2018 16:36:20 +0000 (00:36 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Feb 2018 16:36:26 +0000 (00:36 +0800)
the "includes" directories are separated by spaces not semicolons.

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/BuildBoost.cmake

index 5a76a28c0a351620567cda35fe32563f622959cf..05ce286428b6ec4e13855ba74fc06bbe1bb0620c 100644 (file)
@@ -91,11 +91,13 @@ function(do_build_boost version)
     " : ${CMAKE_CXX_COMPILER}"
     " ;\n")
   if(with_python GREATER -1)
+    set(python_ver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+    string(REPLACE ";" " " python_includes "${PYTHON_INCLUDE_DIRS}")
     file(APPEND ${user_config}
       "using python"
       " : ${python_ver}"
       " : ${PYTHON_EXECUTABLE}"
-      " : ${PYTHON_INCLUDE_DIRS}"
+      " : ${python_includes}"
       " : ${PYTHON_LIBRARIES}"
       " ;\n")
   endif()
@@ -107,7 +109,6 @@ function(do_build_boost version)
       message(FATAL_ERROR "Please call find_package(PythonLibs) first for building "
         "Boost.Python")
     endif()
-    set(python_ver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
     list(APPEND b2 python=${python_ver})
   endif()