Don't build tests when installing; link to Threads::Threads in tests because of lw_thread_test.cpp

This commit is contained in:
Peter Dimov
2020-01-10 00:54:01 +02:00
parent 766ab05a12
commit e0c7bd9a7e
2 changed files with 6 additions and 2 deletions

View File

@@ -342,7 +342,7 @@ matrix:
env: CMAKE_INSTALL_TEST=1
script:
- mkdir __build__ && cd __build__
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES="smart_ptr;assert;config;core;move;static_assert;throw_exception;type_traits" -DCMAKE_INSTALL_PREFIX=~/.local ..
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES="smart_ptr;assert;config;core;move;static_assert;throw_exception;type_traits" -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=~/.local ..
- cmake --build . --target install
- cd ../libs/smart_ptr/test/cmake_install_test && mkdir __build__ && cd __build__
- cmake -DCMAKE_INSTALL_PREFIX=~/.local ..

View File

@@ -6,6 +6,10 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(HAVE_BOOST_TEST)
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::smart_ptr Boost::core Boost::align Boost::atomic Boost::container_hash)
# for lw_thread_test.cpp
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::smart_ptr Boost::core Boost::align Boost::atomic Boost::container_hash Threads::Threads)
endif()