diff --git a/.travis.yml b/.travis.yml index c5f16fa9..920c2436 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: # valgrind - if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 && tar xjf valgrind-3.12.0.tar.bz2 && cd valgrind-3.12.0 && ./configure --prefix=${BASE}/usr > /dev/null && make -j3 > /dev/null && make install > /dev/null && cd ..; fi # boost - - if [ "$BOOST" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.zip && unzip -q boost_1_63_0.zip && cd boost_1_63_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-timer --with-chrono address-model=${ARCH} install > /dev/null && cd ..; fi + - if [ "$BOOST" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.zip && unzip -q boost_1_63_0.zip && cd boost_1_63_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-chrono --with-context --with-system --with-timer address-model=${ARCH} install > /dev/null && cd ..; fi matrix: include: diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ff9f553..3921fc88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,17 +94,13 @@ IF (MSGPACK_BOOST) SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}") SET (Boost_USE_MULTITHREADED ON) SET (Boost_USE_STATIC_RUNTIME OFF) - FIND_PACKAGE (Boost COMPONENTS chrono context timer system) - IF (Boost_INCLUDE_DIRS) - INCLUDE_DIRECTORIES ( - ${Boost_INCLUDE_DIRS} + FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono context system timer) + INCLUDE_DIRECTORIES ( + ${Boost_INCLUDE_DIRS} ) - ENDIF () - IF (Boost_LIBRARY_DIRS) - LINK_DIRECTORIES ( - ${Boost_LIBRARY_DIRS} + LINK_DIRECTORIES ( + ${Boost_LIBRARY_DIRS} ) - ENDIF () IF (MSGPACK_BOOST_DIR) INCLUDE_DIRECTORIES ( ${MSGPACK_BOOST_DIR} diff --git a/example/cpp03/CMakeLists.txt b/example/cpp03/CMakeLists.txt index 93c03f0a..39144cb5 100644 --- a/example/cpp03/CMakeLists.txt +++ b/example/cpp03/CMakeLists.txt @@ -22,7 +22,7 @@ IF (NOT MSVC) ) ENDIF () -IF (Boost_TIMER_LIBRARY AND Boost_CHRONO_LIBRARY AND Boost_SYSTEM_LIBRARY) +IF (MSGPACK_BOOST) LIST (APPEND with_boost_lib_PROGRAMS speed_test.cpp speed_test_nested_array.cpp diff --git a/example/x3/CMakeLists.txt b/example/x3/CMakeLists.txt index f8c3bbba..3624173e 100644 --- a/example/x3/CMakeLists.txt +++ b/example/x3/CMakeLists.txt @@ -7,7 +7,7 @@ IF (MSGPACK_USE_X3_PARSE) unpack.cpp parse.cpp ) - IF (Boost_CONTEXT_LIBRARY AND Boost_SYSTEM_LIBRARY AND CMAKE_THREAD_LIBS_INIT) + IF (MSGPACK_BOOST) LIST (APPEND with_boost_PROGRAMS stream_unpack.cpp )