Skip to content

Commit

Permalink
Split up BOOST_LIBS into _OPTIONAL & _REQUIRED lists (currently only …
Browse files Browse the repository at this point in the history
…'header' as required). Only sets up target for libs found in BOOST_SOURCE/libs/libname.

This allows to build boost with only a subset of the libs (if for example using bcp).

Fixed copy-paste typo

Renamed cmake-files in /libs to equal corresponding module-name in boost-repo/libs.

Moved 'added <lib>'-message into the script actually adding the lib.

Removed 'added lib'-message
  • Loading branch information
helmesjo authored and Orphis committed Oct 2, 2017
1 parent 7bfe14b commit 6c418d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ if(USE_ANDROID)
set(CMAKE_ASM_COMPILER_TARGET "${CMAKE_CXX_COMPILER_TARGET}")
endif()

set(BOOST_LIBS
set(BOOST_LIBS_REQUIRED
# Header only libs
header

)
set(BOOST_LIBS_OPTIONAL
# Compiled libs
atomic
chrono
Expand All @@ -53,17 +54,24 @@ set(BOOST_LIBS
serialization
signals
system
unit_test_framework
test
thread
timer
type_erasure
wave
)

foreach(lib ${BOOST_LIBS})
foreach(lib ${BOOST_LIBS_REQUIRED})
include("libs/${lib}.cmake")
endforeach()

foreach(lib ${BOOST_LIBS_OPTIONAL})
# In case only a subset of modules is available (eg. after using bcp)
if(EXISTS "${BOOST_SOURCE}/libs/${lib}")
include("libs/${lib}.cmake")
endif()
endforeach()

# TODO: Move those to option() calls in the right file
if(NOT BOOST_STANDALONE)
# Compilation options required by all platforms
Expand Down
File renamed without changes.

0 comments on commit 6c418d1

Please sign in to comment.