]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Add support for bzip2.
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 22 Dec 2013 17:03:18 +0000 (17:03 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 22 Dec 2013 17:03:18 +0000 (17:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@32096 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/bundled/CMakeLists.txt
deal.II/cmake/configure/configure_1_bzip2.cmake [new file with mode: 0644]
deal.II/cmake/configure/configure_1_zlib.cmake [moved from deal.II/cmake/configure/configure_zlib.cmake with 100% similarity]
deal.II/cmake/configure/configure_boost.cmake
deal.II/include/deal.II/base/config.h.in

index f2891f1d7101ad23fb13b65b6c0344a7d33c76bd..f1ab6bc8399b8d3a97c9b371c80360badc90152a 100644 (file)
@@ -32,17 +32,13 @@ 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_ZLIB AND DEAL_II_WITH_BZIP2)
+    ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/iostreams/src)
+  ENDIF()
+
   IF(DEAL_II_WITH_THREADS AND NOT DEAL_II_USE_CXX11)
-    #
-    # If the C++ compiler doesn't completely support the C++11 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
-    #
     ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/thread/src)
   ENDIF()
 ENDIF()
diff --git a/deal.II/cmake/configure/configure_1_bzip2.cmake b/deal.II/cmake/configure/configure_1_bzip2.cmake
new file mode 100644 (file)
index 0000000..61fd319
--- /dev/null
@@ -0,0 +1,36 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2012 - 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 zlib library:
+#
+
+MACRO(FEATURE_BZIP2_FIND_EXTERNAL var)
+
+  FIND_PACKAGE(BZip2)
+
+  IF(BZIP2_FOUND)
+    #
+    # Rename some variables:
+    #
+    SET(BZIP2_VERSION ${BZIP2_VERSION_STRING})
+    SET(BZIP2_INCLUDE_DIRS ${BZIP2_INCLUDE_DIR})
+
+    SET(${var} TRUE)
+  ENDIF()
+ENDMACRO()
+
+CONFIGURE_FEATURE(BZIP2)
index 31983ddcee0328e26587994f22f08beec87912ce..de29304bbf61942974fbc691c55ba723f2359ffe 100644 (file)
@@ -112,13 +112,6 @@ SET(BOOST_ADD_TO_USER_INCLUDE_DIRS TRUE)
 
 
 MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
-  #
-  # We need to set some definitions to use the headers of the bundled boost
-  # library:
-  #
-  LIST(APPEND DEAL_II_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")
-  LIST(APPEND DEAL_II_USER_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")
-
   INCLUDE_DIRECTORIES(${BOOST_FOLDER}/include)
 ENDMACRO()
 
index 6766f7c24eb260c7bbdd1c0048fd73e7674df057..34c4b9baf9d433688e736c0c9378840f98599dd8 100644 (file)
  */
 #cmakedefine DEAL_II_USE_CXX11
 #ifdef DEAL_II_USE_CXX11
+/* Compatibility definition (with naming from deal.II < 8.0): */
 # define DEAL_II_CAN_USE_CXX11
 # define DEAL_II_CAN_USE_CXX1X
 #endif
 
 #cmakedefine DEAL_II_WITH_ARPACK
 #ifdef DEAL_II_WITH_ARPACK
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_ARPACK
 #endif
 
 
 #cmakedefine DEAL_II_WITH_FUNCTIONPARSER
 #ifdef DEAL_II_WITH_FUNCTIONPARSER
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define HAVE_FUNCTIONPARSER
 #endif
 
 
 #cmakedefine DEAL_II_WITH_HDF5
 #ifdef DEAL_II_WITH_HDF5
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_HAVE_HDF5
 #endif
 
 
 #cmakedefine DEAL_II_WITH_LAPACK
 #ifdef DEAL_II_WITH_LAPACK
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define HAVE_LIBLAPACK
 
 /* Defined if the corresponding BLAS or LAPACK function is available */
 
 #cmakedefine DEAL_II_WITH_METIS
 #ifdef DEAL_II_WITH_METIS
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_METIS
 #endif
 
 
 #cmakedefine DEAL_II_WITH_MPI
 #ifdef DEAL_II_WITH_MPI
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_COMPILER_SUPPORTS_MPI
 #endif
 
 
 #cmakedefine DEAL_II_WITH_MUMPS
 #ifdef DEAL_II_WITH_MUMPS
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_MUMPS
 #endif
 
 
 #cmakedefine DEAL_II_WITH_NETCDF
 #ifdef DEAL_II_WITH_NETCDF
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define HAVE_LIBNETCDF
 #endif
 
 
 #cmakedefine DEAL_II_WITH_P4EST
 #ifdef DEAL_II_WITH_P4EST
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_P4EST
 
 #  define DEAL_II_P4EST_VERSION_MAJOR @P4EST_VERSION_MAJOR@
 
 #cmakedefine DEAL_II_WITH_PETSC
 #ifdef DEAL_II_WITH_PETSC
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_PETSC
 #endif
 
 
 #cmakedefine DEAL_II_WITH_SLEPC
 #ifdef DEAL_II_WITH_SLEPC
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_SLEPC
 #endif
 
 
+/***************************************
+ * Configured in configure_1_bzip2.cmake: *
+ ***************************************/
+
+#cmakedefine DEAL_II_WITH_BZIP2
+
+
 /********************************************
  * Configured in configure_1_threads.cmake: *
  ********************************************/
 
 #cmakedefine DEAL_II_WITH_THREADS
 #ifdef DEAL_II_WITH_THREADS
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_MT
 #endif
 
 #endif
 
 
+/*****************************************
+ * Configured in configure_1_zlib.cmake: *
+ *****************************************/
+
+#cmakedefine DEAL_II_WITH_ZLIB
+#ifdef DEAL_II_WITH_ZLIB
+/* Compatibility definition (with naming from deal.II < 8.0): */
+#  define HAVE_LIBZ
+#endif
+
+
 /*******************************************
  * Configured in configure_trilinos.cmake: *
  *******************************************/
 
 #cmakedefine DEAL_II_WITH_TRILINOS
 #ifdef DEAL_II_WITH_TRILINOS
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define DEAL_II_USE_TRILINOS
 #endif
 
 
 #cmakedefine DEAL_II_WITH_UMFPACK
 #ifdef DEAL_II_WITH_UMFPACK
+/* Compatibility definition (with naming from deal.II < 8.0): */
 #  define HAVE_LIBUMFPACK
 #endif
 
 
-/***************************************
- * Configured in configure_zlib.cmake: *
- ***************************************/
-
-#cmakedefine DEAL_II_WITH_ZLIB
-#ifdef DEAL_II_WITH_ZLIB
-#  define HAVE_LIBZ
-#endif
-
-
 #include <deal.II/base/numbers.h>
 #include <deal.II/base/types.h>
 

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.