]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfixes in configure_boost.cmake
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:19 +0000 (23:57 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:19 +0000 (23:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@29003 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_boost.cmake

index b295d8304474fc80eae91a40abef4337e4e97e9b..67d90ff848eace37cfbdfed4bad291264fb47e24 100644 (file)
@@ -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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.