USE_STATIC_BOOST has to used to define if boost is static or not

This commit is contained in:
Holger Nahrstaedt 2016-03-09 16:22:18 +01:00
parent cf869ef0c4
commit 552034c74f
3 changed files with 12 additions and 4 deletions

View File

@ -35,7 +35,7 @@ install:
before_script: before_script:
- mkdir build.ci - mkdir build.ci
- cd build.ci - cd build.ci
- cmake .. -DBUILD_UT=ON -DCMAKE_BUILD_TYPE=$BUILD_CONFIG - cmake .. -DBUILD_UT=ON -DCMAKE_BUILD_TYPE=$BUILD_CONFIG -DUSE_STATIC_BOOST=YES
script: script:
- cmake --build . - cmake --build .

View File

@ -35,10 +35,18 @@ include_directories(${PROJECT_WIDE_INCLUDE})
# TODO: need to handle this with option # TODO: need to handle this with option
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.40 COMPONENTS unit_test_framework REQUIRED) set(Boost_USE_STATIC_LIBS ${USE_STATIC_BOOST})
set(Boost_USE_MULTITHREADED ON)
unset(Boost_INCLUDE_DIR CACHE)
unset(Boost_LIBRARY_DIRS CACHE)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
if(USE_STATIC_BOOST)
message(STATUS "Linking against boost static libraries")
else(USE_STATIC_BOOST)
message(STATUS "Linking against boost dynamic libraries")
endif(USE_STATIC_BOOST)
# disable autolinking feature # disable autolinking feature
add_definitions(-DBOOST_ALL_NO_LIB) add_definitions(-DBOOST_ALL_NO_LIB)

View File

@ -9,7 +9,7 @@ environment:
build_script: build_script:
- mkdir build - mkdir build
- cd build - cd build
- cmake -G "Visual Studio 14 2015 Win64" .. - cmake -G "Visual Studio 14 2015 Win64" -DUSE_STATIC_BOOST=NO ..
- cmake --build . --config Debug - cmake --build . --config Debug
test_script: test_script: