From 1754fdf067a6c4e955858fbef855bc3bb0b7887c Mon Sep 17 00:00:00 2001 From: maier Date: Sat, 23 Mar 2013 23:57:19 +0000 Subject: [PATCH] CMake: Bugfixes in configure_boost.cmake git-svn-id: https://svn.dealii.org/trunk@29003 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_boost.cmake | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake index b295d83044..67d90ff848 100644 --- a/deal.II/cmake/configure/configure_boost.cmake +++ b/deal.II/cmake/configure/configure_boost.cmake @@ -38,14 +38,17 @@ MACRO(FEATURE_BOOST_FIND_EXTERNAL var) # # We require at least version 1.44 # - FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system thread) + IF(DEAL_II_WITH_THREADS) + FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system thread) + ELSE() + FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system) + ENDIF() - IF(Boost_THREAD_FOUND AND - Boost_SERIALIZATION_FOUND AND - Boost_SYSTEM_FOUND) + IF( Boost_SERIALIZATION_FOUND AND + Boost_SYSTEM_FOUND AND + (NOT DEAL_II_WITH_THREADS OR Boost_THREAD_FOUND) + ) SET(${var} TRUE) - - # Get rid of this annoying unimportant variable: MARK_AS_ADVANCED(Boost_DIR) ENDIF() ENDMACRO() @@ -54,6 +57,12 @@ ENDMACRO() MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL) INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) + # + # Remove "pthread" from Boost_LIBRARIES. Threading, if necessary, is + # already set up via configure_1_threads.cmake. + # + LIST(REMOVE_ITEM Boost_LIBRARIES "pthread") + # # Transform Boost_LIBRARIES into a list of debug and release libraries # without keywords: -- 2.39.5