mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-18 19:48:46 +02:00
cmake: Make boost mandatory if MSGPACK_BOOST is ON
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
This commit is contained in:
@@ -27,7 +27,7 @@ install:
|
|||||||
# valgrind
|
# 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
|
- 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
|
# 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:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@@ -94,17 +94,13 @@ IF (MSGPACK_BOOST)
|
|||||||
SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}")
|
SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}")
|
||||||
SET (Boost_USE_MULTITHREADED ON)
|
SET (Boost_USE_MULTITHREADED ON)
|
||||||
SET (Boost_USE_STATIC_RUNTIME OFF)
|
SET (Boost_USE_STATIC_RUNTIME OFF)
|
||||||
FIND_PACKAGE (Boost COMPONENTS chrono context timer system)
|
FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono context system timer)
|
||||||
IF (Boost_INCLUDE_DIRS)
|
|
||||||
INCLUDE_DIRECTORIES (
|
INCLUDE_DIRECTORIES (
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
ENDIF ()
|
|
||||||
IF (Boost_LIBRARY_DIRS)
|
|
||||||
LINK_DIRECTORIES (
|
LINK_DIRECTORIES (
|
||||||
${Boost_LIBRARY_DIRS}
|
${Boost_LIBRARY_DIRS}
|
||||||
)
|
)
|
||||||
ENDIF ()
|
|
||||||
IF (MSGPACK_BOOST_DIR)
|
IF (MSGPACK_BOOST_DIR)
|
||||||
INCLUDE_DIRECTORIES (
|
INCLUDE_DIRECTORIES (
|
||||||
${MSGPACK_BOOST_DIR}
|
${MSGPACK_BOOST_DIR}
|
||||||
|
@@ -22,7 +22,7 @@ IF (NOT MSVC)
|
|||||||
)
|
)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
IF (Boost_TIMER_LIBRARY AND Boost_CHRONO_LIBRARY AND Boost_SYSTEM_LIBRARY)
|
IF (MSGPACK_BOOST)
|
||||||
LIST (APPEND with_boost_lib_PROGRAMS
|
LIST (APPEND with_boost_lib_PROGRAMS
|
||||||
speed_test.cpp
|
speed_test.cpp
|
||||||
speed_test_nested_array.cpp
|
speed_test_nested_array.cpp
|
||||||
|
@@ -7,7 +7,7 @@ IF (MSGPACK_USE_X3_PARSE)
|
|||||||
unpack.cpp
|
unpack.cpp
|
||||||
parse.cpp
|
parse.cpp
|
||||||
)
|
)
|
||||||
IF (Boost_CONTEXT_LIBRARY AND Boost_SYSTEM_LIBRARY AND CMAKE_THREAD_LIBS_INIT)
|
IF (MSGPACK_BOOST)
|
||||||
LIST (APPEND with_boost_PROGRAMS
|
LIST (APPEND with_boost_PROGRAMS
|
||||||
stream_unpack.cpp
|
stream_unpack.cpp
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user