From: bangerth Date: Sat, 21 Dec 2013 22:15:12 +0000 (+0000) Subject: Configure things so that we only build BOOST.Iostreams if libz and libbz2 are actuall... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60ebf366dca65f304ab65a23a68a8556649a9441;p=dealii-svn.git Configure things so that we only build BOOST.Iostreams if libz and libbz2 are actually available. git-svn-id: https://svn.dealii.org/trunk@32092 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt index f2891f1d71..70a1531d47 100644 --- a/deal.II/bundled/CMakeLists.txt +++ b/deal.II/bundled/CMakeLists.txt @@ -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 index 0000000000..503670662e --- /dev/null +++ b/deal.II/cmake/configure/configure_bz2lib.cmake @@ -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) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 2d21073c7e..be811da606 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -52,7 +52,9 @@ inconvenience this causes.
  1. New: deal.II now links with the BOOST - Iostreams library. Among many other things, this allows to easily + Iostreams 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