]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Configure things so that we only build BOOST.Iostreams if libz and libbz2 are actuall...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 21 Dec 2013 22:15:12 +0000 (22:15 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 21 Dec 2013 22:15:12 +0000 (22:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@32092 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/bundled/CMakeLists.txt
deal.II/cmake/configure/configure_bz2lib.cmake [new file with mode: 0644]
deal.II/doc/news/changes.h

index f2891f1d7101ad23fb13b65b6c0344a7d33c76bd..70a1531d47618374ef629a05bb4c087ecea0d533 100644 (file)
@@ -32,7 +32,6 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     "${BOOST_FOLDER}/include\n"
     )
 
-  ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/iostreams/src)
   ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/serialization/src)
 
   IF(DEAL_II_WITH_THREADS AND NOT DEAL_II_USE_CXX11)
@@ -45,6 +44,15 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
     #
     ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/thread/src)
   ENDIF()
+
+  # BOOST.iostreams is useful, but it requires libbz2 and libz
+  # to be around. Don't do it if we can't find these two libs.
+  IF(DEAL_II_WITH_BZ2LIB AND DEAL_II_WITH_ZLIB)
+    MESSAGE(STATUS "Configuring BOOST Iostreams library")
+    ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/iostreams/src)
+  ELSE()
+    MESSAGE(STATUS "BOOST.iostream will not be available because libz or libbz2 were not found")
+  ENDIF()
 ENDIF()
 
 
diff --git a/deal.II/cmake/configure/configure_bz2lib.cmake b/deal.II/cmake/configure/configure_bz2lib.cmake
new file mode 100644 (file)
index 0000000..5036706
--- /dev/null
@@ -0,0 +1,21 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Configuration for the bz2 library:
+#
+
+CONFIGURE_FEATURE(BZip2)
index 2d21073c7e67c8fd19f46699e64de421cafa4b2d..be811da6063c3b227d723e40d4bc38f1b5f06fa2 100644 (file)
@@ -52,7 +52,9 @@ inconvenience this causes.
 <ol>
   <li> New: deal.II now links with the
   <a href="http://www.boost.org/doc/libs/1_55_0/libs/iostreams/doc/index.html">BOOST
-  Iostreams</a> library. Among many other things, this allows to easily
+  Iostreams</a> library (at least if the libz and libbz2 libraries
+  can be found that are necessary for BOOST Iostreams).
+  Among many other things, this allows to easily
   read files that have been compressed, as in the following code snippet:
   @code
     #include <boost/iostreams/filtering_stream.hpp>

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.