From 3ee446dfc287529d544b45023393afea7794e384 Mon Sep 17 00:00:00 2001 From: Chris Cantwell Date: Tue, 11 Dec 2012 12:22:54 +0000 Subject: [PATCH] Fixed Boost library detection to allow selection of non-mt or -mt variants. --- cmake/ThirdPartyBoost.cmake | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/cmake/ThirdPartyBoost.cmake b/cmake/ThirdPartyBoost.cmake index 59307f32a..b931184f7 100644 --- a/cmake/ThirdPartyBoost.cmake +++ b/cmake/ThirdPartyBoost.cmake @@ -1,5 +1,8 @@ SET(THIRDPARTY_BUILD_BOOST OFF CACHE BOOL "Build Boost libraries") +SET(Boost_USE_MULTITHREADED ON CACHE BOOL + "Search for multithreaded boost libraries") +MARK_AS_ADVANCED(Boost_USE_MULTITHREADED) IF (THIRDPARTY_BUILD_BOOST) INCLUDE(ExternalProject) @@ -99,18 +102,6 @@ ELSE (THIRDPARTY_BUILD_BOOST) FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/dist) FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) - - # In case we have not found the threaded version, look for the - # non-threaded version of the libraries. - SET(Boost_USE_MULTITHREADED OFF) - SET(BOOST_ROOT $ENV{BOOST_HOME}) - FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) - SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/boost) - FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) - SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/../ThirdParty/boost) - FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) - SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/dist) - FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) ELSE() FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex) ENDIF() -- GitLab