]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: fix boost build on ubuntu yakkety 12143/head
authorBassam Tabbara <bassam.tabbara@quantum.com>
Tue, 22 Nov 2016 19:53:34 +0000 (11:53 -0800)
committerBassam Tabbara <bassam.tabbara@quantum.com>
Tue, 22 Nov 2016 19:53:34 +0000 (11:53 -0800)
If the host system has boost version 1.61 or higher (as in the case
for ubuntu 16.10 yakkety) the ceph build is currently broken. it
will pickup the system boost libraries but use the headers from the
submodule.

This commit ensure that when WITH_SYSTEM_BOOST is OFF we always
use the boost libraries and headers built from the submodule.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
CMakeLists.txt

index 12f3c5d383edb3bdb2eb93c4dd4110d86968512a..69a6a371701b2d57a3986723b3e3250f304668da 100644 (file)
@@ -449,6 +449,9 @@ else()
   include_directories(BEFORE ${BOOST_PREFIX}/include)
   # fixup for CheckIncludeFileCXX
   set(HAVE_BOOST_ASIO_COROUTINE ON)
+
+  set(BOOST_ROOT ${BOOST_PREFIX})
+  set(Boost_NO_SYSTEM_PATHS ON)
 endif()
 
 set(Boost_USE_MULTITHREADED ON)
@@ -460,7 +463,7 @@ if(WITH_MGR)
 endif()
 
 # require minimally the bundled version
-find_package(Boost 1.61 COMPONENTS thread system regex random program_options date_time iostreams REQUIRED)
+find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
 include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
 include_directories(SYSTEM ${PROJECT_BINARY_DIR}/include)