Skip to content

Commit

Permalink
cmake: fix boost components for WITH_SYSTEM_BOOST
Browse files Browse the repository at this point in the history
when using WITH_SYSTEM_BOOST dont set header-only packages
for BOOST_COMPONENTS. On some distros these packages dont
exist.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
(cherry picked from commit 23b0732)
  • Loading branch information
bassam authored and smithfarm committed May 23, 2017
1 parent c9169a7 commit f807387
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ endif()
option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF)

set(BOOST_COMPONENTS
container thread system regex random program_options date_time iostreams coroutine context)
thread system regex random program_options date_time iostreams coroutine context)
set(BOOST_HEADER_COMPONENTS container)

if(WITH_MGR)
list(APPEND BOOST_COMPONENTS python)
endif()
Expand All @@ -535,6 +537,7 @@ else()
set(BOOST_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
set(BOOST_PREFIX "${PROJECT_BINARY_DIR}/boost")
set(BOOST_BUILD "${PROJECT_BINARY_DIR}/boost-build")
list(APPEND BOOST_COMPONENTS ${BOOST_HEADER_COMPONENTS})
string(REPLACE ";" "," BOOST_WITH_LIBS "${BOOST_COMPONENTS}")
execute_process(COMMAND "./bootstrap.sh"
"--prefix=${BOOST_PREFIX}"
Expand Down

0 comments on commit f807387

Please sign in to comment.