]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Disable compilation of bundled boost if external boost library is used
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Mar 2012 22:40:00 +0000 (22:40 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Mar 2012 22:40:00 +0000 (22:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@25260 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/source/base/boost_serialization.cc
deal.II/source/base/boost_threads.cc

index f2d53e01bafab96c90500347e8d17791803e2744..59392533292a3a781a6f0afe7b809557d5c96f7e 100644 (file)
@@ -7561,6 +7561,9 @@ AC_DEFUN(DEAL_II_WITH_BOOST, dnl
     if test "$LD_PATH_OPTION" != "no" ; then
       BOOST_LIB_DIR="$LD_PATH_OPTION$1/lib"
     fi
+    AC_DEFINE([DEAL_II_USE_EXTERNAL_BOOST], [1],
+              [Defined if deal.II is configured with an external Boost library])
+    DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-lboost_thread-mt -lboost_serialization-mt)
   else
     BOOST_INCLUDE_DIR=''
     BOOST_LIB_DIR=''
index 2bddd03a86d2ecc24f92694f205fe73943abc76c..a9fb070f6efbb629d8c5803217665a99f2f65a48 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <deal.II/base/config.h>
 
+#ifndef DEAL_II_USE_EXTERNAL_BOOST
+
 #include "../../contrib/boost-1.46.1/libs/serialization/src/basic_archive.cpp"
 #include "../../contrib/boost-1.46.1/libs/serialization/src/basic_iarchive.cpp"
 #include "../../contrib/boost-1.46.1/libs/serialization/src/basic_iserializer.cpp"
@@ -42,3 +44,5 @@
 #include "../../contrib/boost-1.46.1/libs/serialization/src/xml_oarchive.cpp"
 #include "../../contrib/boost-1.46.1/libs/serialization/src/xml_archive_exception.cpp"
 #include "../../contrib/boost-1.46.1/libs/serialization/src/shared_ptr_helper.cpp"
+
+#endif /* DEAL_II_USE_EXTERNAL_BOOST */
index a8c8c57ada82bb1d534d9decd6d488e2e0f16ec0..bb06118038d9a08e596aa489ddd73fe4414374ea 100644 (file)
 
 #include <deal.II/base/config.h>
 
-#if (DEAL_II_USE_MT == 1) && !defined(DEAL_II_CAN_USE_CXX1X)
+#if (DEAL_II_USE_MT == 1) && !defined(DEAL_II_CAN_USE_CXX1X) && !defined(DEAL_II_USE_EXTERNAL_BOOST)
 
 // if the C++ compiler doesn't completely support the C++1x standard (and
 // consequently we can't use std::thread, std::mutex, etc), then include all
 // the files that form BOOST's thread implementation so that we don't have to
 // build BOOST itself only to get at this small part of it. it also ensures
 // that we use the correct compiler and flags
+
 #  define BOOST_THREAD_BUILD_LIB 1
 #  define DBOOST_ALL_NO_LIB 1
 

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.