From 3eef10b977294f6d2d16f3fb6e61a99a35cbc6df Mon Sep 17 00:00:00 2001 From: Bassam Tabbara Date: Tue, 22 Nov 2016 11:53:34 -0800 Subject: [PATCH] cmake: fix boost build on ubuntu yakkety 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 --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12f3c5d383e..69a6a371701 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) -- 2.47.3