diff options
author | Felix Geyer <debfx@fobos.de> | 2018-11-06 17:33:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-09 15:38:45 (GMT) |
commit | bd831ed0948a1e99f573f0056f2bee5d3b21009e (patch) | |
tree | 6ea4952cb2849169ea48355d955112c05df6c566 /Modules | |
parent | 8d70ed5a10362209d265a15d993f319235aea7e5 (diff) | |
download | CMake-bd831ed0948a1e99f573f0056f2bee5d3b21009e.zip CMake-bd831ed0948a1e99f573f0056f2bee5d3b21009e.tar.gz CMake-bd831ed0948a1e99f573f0056f2bee5d3b21009e.tar.bz2 |
FindBoost: Add system thread library to Boost_LIBRARIES
Add the system thread library to Boost_LIBRARIES when the boost thread
component has been found.
The Boost::thread imported target already pulls in Threads::Threads.
This changes does the same for projects using the Boost_LIBRARIES variable
instead.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBoost.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index e983941..0794a6f 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -2074,6 +2074,9 @@ if(Boost_FOUND) message (STATUS " ${COMPONENT}") endif() list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY}) + if(COMPONENT STREQUAL "thread") + list(APPEND Boost_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + endif() endif() endforeach() else() |