// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2012 - 2025 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-2.1-or-later. Detailed license information // governing the source code and code contributions can be found in // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. // // ------------------------------------------------------------------------ #ifndef dealii_config_h #define dealii_config_h /*********************************************************************** * Some deal.II macros depends on Kokkos macros: */ #include /*********************************************************************** * Information about deal.II: */ #define DEAL_II_PACKAGE_NAME "@DEAL_II_PACKAGE_NAME@" #define DEAL_II_PACKAGE_VERSION "@DEAL_II_PACKAGE_VERSION@" #define DEAL_II_VERSION_MAJOR @DEAL_II_VERSION_MAJOR@ #define DEAL_II_VERSION_MINOR @DEAL_II_VERSION_MINOR@ #define DEAL_II_VERSION_SUBMINOR @DEAL_II_VERSION_SUBMINOR@ /*********************************************************************** * Two macro names that we put at the top and bottom of all deal.II files * and that will be expanded to "namespace dealii {" and "}". */ #define DEAL_II_NAMESPACE_OPEN namespace dealii { #define DEAL_II_NAMESPACE_CLOSE } /*********************************************************************** * A variable that can be used to query whether we are compiling in * debug or release mode. */ DEAL_II_NAMESPACE_OPEN /** * An enum type that is used to describe what kind of build has * been used to compile the deal.II library: Namely, whether it is * a debug or a release build. */ enum class LibraryBuildMode { debug, release }; /** * A variable that can be queried to determine whether the deal.II * library you are trying to compile against is a debug or a release * mode build. */ constexpr LibraryBuildMode library_build_mode #ifdef DEBUG = LibraryBuildMode::debug; #else = LibraryBuildMode::release; #endif /** * A function that returns whether we are currently compiling for a debug * build (rather than a release build). */ constexpr bool running_in_debug_mode() { return (library_build_mode == LibraryBuildMode::debug); } DEAL_II_NAMESPACE_CLOSE /*********************************************************************** * Configured deal.II features: */ #cmakedefine DEAL_II_WITH_64BIT_INDICES #cmakedefine DEAL_II_WITH_ADOLC #cmakedefine DEAL_II_WITH_ARPACK #cmakedefine DEAL_II_WITH_ARBORX #cmakedefine DEAL_II_WITH_ASSIMP #cmakedefine DEAL_II_FEATURE_BOOST_BUNDLED_CONFIGURED #cmakedefine DEAL_II_WITH_CGAL #cmakedefine DEAL_II_WITH_COMPLEX_VALUES #cmakedefine DEAL_II_WITH_GINKGO #cmakedefine DEAL_II_WITH_GMSH #cmakedefine DEAL_II_WITH_GSL #cmakedefine DEAL_II_WITH_HDF5 #cmakedefine DEAL_II_WITH_KOKKOS #cmakedefine DEAL_II_FEATURE_KOKKOS_BUNDLED_CONFIGURED #cmakedefine DEAL_II_WITH_LAPACK #cmakedefine LAPACK_WITH_64BIT_BLAS_INDICES #cmakedefine DEAL_II_LAPACK_WITH_MKL #cmakedefine DEAL_II_WITH_MAGIC_ENUM #cmakedefine DEAL_II_WITH_METIS #cmakedefine DEAL_II_WITH_MPI #cmakedefine DEAL_II_WITH_MUPARSER #cmakedefine DEAL_II_WITH_MUMPS #cmakedefine DEAL_II_FEATURE_MUPARSER_BUNDLED_CONFIGURED #cmakedefine DEAL_II_WITH_OPENCASCADE #cmakedefine DEAL_II_WITH_P4EST #cmakedefine DEAL_II_WITH_PETSC #cmakedefine DEAL_II_WITH_PSBLAS #cmakedefine DEAL_II_WITH_SCALAPACK #cmakedefine DEAL_II_WITH_SLEPC #cmakedefine DEAL_II_WITH_SUNDIALS #cmakedefine DEAL_II_WITH_SYMENGINE #cmakedefine DEAL_II_WITH_TASKFLOW #cmakedefine DEAL_II_FEATURE_TASKFLOW_BUNDLED_CONFIGURED #cmakedefine DEAL_II_WITH_TBB #cmakedefine DEAL_II_FEATURE_TBB_BUNDLED_CONFIGURED #cmakedefine DEAL_II_WITH_TRILINOS #cmakedefine DEAL_II_WITH_UMFPACK #cmakedefine DEAL_II_FEATURE_UMFPACK_BUNDLED_CONFIGURED #cmakedefine DEAL_II_USE_VECTORIZATION_GATHER #cmakedefine DEAL_II_WITH_VTK #cmakedefine DEAL_II_WITH_ZLIB #ifdef DEAL_II_WITH_TBB /** * For backwards compatibility, continue defining DEAL_II_WITH_THREADS when the * library is configured with TBB. */ #define DEAL_II_WITH_THREADS #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 #cmakedefine DEAL_II_TBB_WITH_ONEAPI #endif /*********************************************************************** * Compiler bugs: * * For documentation see cmake/checks/check_03_compiler_bugs.cmake */ #cmakedefine DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG /*********************************************************************** * Compiler features: * * For documentation see cmake/checks/check_01_compiler_features.cmake */ #cmakedefine DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS #cmakedefine DEAL_II_VECTOR_ITERATOR_IS_POINTER #cmakedefine DEAL_II_HAVE_BUILTIN_EXPECT #cmakedefine DEAL_II_HAVE_GLIBC_STACKTRACE #cmakedefine DEAL_II_HAVE_LIBSTDCXX_DEMANGLER #cmakedefine __PRETTY_FUNCTION__ @__PRETTY_FUNCTION__@ #cmakedefine DEAL_II_ALWAYS_INLINE @DEAL_II_ALWAYS_INLINE@ #cmakedefine DEAL_II_RESTRICT @DEAL_II_RESTRICT@ #cmakedefine DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA #define DEAL_II_HOST_DEVICE KOKKOS_FUNCTION #define DEAL_II_HOST_DEVICE_ALWAYS_INLINE KOKKOS_FORCEINLINE_FUNCTION // clang++ assumes that all constexpr functions are __host__ __device__ when // Kokkos was configured with CUDA or HIP support. This is problematic // when calling non-constexpr functions in constexpr functions. Hence, we // need a way to annotate functions explicitly as host-only. #cmakedefine DEAL_II_KOKKOS_ENABLE_HIP #if (defined(__clang__) && defined(__CUDA__)) || defined(DEAL_II_KOKKOS_ENABLE_HIP) # define DEAL_II_HOST __host__ #else # define DEAL_II_HOST #endif /*********************************************************************** * CPU features: * * For documentation see cmake/checks/check_01_cpu_features.cmake */ #cmakedefine DEAL_II_WORDS_BIGENDIAN /* * This sets the largest number of vectorization bits detected for the given * compiler flags and hardware (e.g. 256 for AVX on x86-64 architectures) for * use in deal.II's intrinsics-based VectorizedArray class. */ #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS @DEAL_II_VECTORIZATION_WIDTH_IN_BITS@ /* * Backward compatibility setting */ #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1 #else #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0 #endif #define DEAL_II_OPENMP_SIMD_PRAGMA @DEAL_II_OPENMP_SIMD_PRAGMA@ /*********************************************************************** * Language features: * * For documentation see cmake/checks/check_01_cxx_features.cmake */ #cmakedefine DEAL_II_HAVE_CXX14 #cmakedefine DEAL_II_HAVE_CXX17 #cmakedefine DEAL_II_HAVE_CXX20 #cmakedefine DEAL_II_HAVE_CXX23 #cmakedefine DEAL_II_HAVE_FP_EXCEPTIONS #cmakedefine DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS #cmakedefine DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS #cmakedefine DEAL_II_CXX14_CONSTEXPR_BUG // The following three are defined for backwards compatibility with older // deal.II versions: #define DEAL_II_WITH_CXX11 #define DEAL_II_WITH_CXX14 #define DEAL_II_WITH_CXX17 /** * If we have C++20 available, we can have concepts and requires * clauses. We want to avoid using too many `#ifdef` statements, so * define a convenience macro that allows us to write a 'requires' * clause that is simply removed when not using C++20. */ #if defined(DEAL_II_HAVE_CXX20) && !defined(DEAL_II_DOXYGEN_DO_NOT_PARSE_REQUIRES_CLAUSES) # define DEAL_II_CXX20_REQUIRES(condition) requires(condition) #else # define DEAL_II_CXX20_REQUIRES(condition) #endif /** * Provide support for the C++23 [[assume]] attribute. To mimic the * attribute for older standards we rely on compiler intrinsics when * available. */ #ifdef DEAL_II_HAVE_CXX23 # define DEAL_II_CXX23_ASSUME(expr) [[assume(expr)]] #else # if defined(__clang__) # define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast(expr)) # elif defined(_MSC_VER) || defined(__ICC) # define DEAL_II_CXX23_ASSUME(expr) __assume(expr); # else /* no way with GCC to express this without evaluating 'expr' */ # define DEAL_II_CXX23_ASSUME(expr) \ do \ { \ } \ while (false) # endif #endif #cmakedefine DEAL_II_FALLTHROUGH @DEAL_II_FALLTHROUGH@ #cmakedefine DEAL_II_CONSTEXPR @DEAL_II_CONSTEXPR@ /*********************************************************************** * Dealing with deprecations. */ /** * Macro indicating that the current feature will be removed in a future * release. */ #define DEAL_II_DEPRECATED [[deprecated]] #define DEAL_II_DEPRECATED_WITH_COMMENT(comment) [[deprecated(comment)]] /** * Same as above, but for things that have been deprecated during the current * development cycle. By default, no warnings are printed for a feature * deprecated prior to a release until after that release has been * finalized - see DEAL_II_EARLY_DEPRECATIONS for more information. */ #cmakedefine DEAL_II_EARLY_DEPRECATIONS #ifndef DEAL_II_DEPRECATED_EARLY // guard to allow user to override DEAL_II_DEPRECATED_EARLY #ifdef DEAL_II_EARLY_DEPRECATIONS #define DEAL_II_DEPRECATED_EARLY [[deprecated]] #else #define DEAL_II_DEPRECATED_EARLY #endif #endif #ifndef DEAL_II_DEPRECATED_EARLY_WITH_COMMENT // guard to allow user to override DEAL_II_DEPRECATED_EARLY #ifdef DEAL_II_EARLY_DEPRECATIONS #define DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(comment) [[deprecated(comment)]] #else #define DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(comment) #endif #endif /*********************************************************************** * System features: * * For documentation see cmake/checks/check_02_system_features.cmake */ #cmakedefine DEAL_II_HAVE_SYS_RESOURCE_H #cmakedefine DEAL_II_HAVE_UNISTD_H #cmakedefine DEAL_II_HAVE_GETHOSTNAME #cmakedefine DEAL_II_HAVE_GETPID #cmakedefine DEAL_II_HAVE_JN #cmakedefine DEAL_II_MSVC /*********************************************************************** * Feature configuration * * For documentation see cmake/configure/configure_*.cmake and * cmake/modules/Find*.cmake */ /* cmake/modules/FindADOLC.cmake */ #cmakedefine DEAL_II_ADOLC_WITH_ATRIG_ERF #cmakedefine DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING #cmakedefine DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING /* cmake/modules/FindARBORX.cmake */ #cmakedefine DEAL_II_ARBORX_WITH_MPI /* cmake/modules/FindARPACK.cmake */ #cmakedefine DEAL_II_ARPACK_WITH_PARPACK /* cmake/modules/FindGMSH.cmake */ #cmakedefine DEAL_II_GMSH_WITH_API /* cmake/modules/FindPETSC.cmake */ #cmakedefine DEAL_II_PETSC_WITH_COMPLEX #cmakedefine DEAL_II_PETSC_WITH_HYPRE #cmakedefine DEAL_II_PETSC_WITH_MUMPS #cmakedefine DEAL_II_PETSC_WITH_KOKKOS /* cmake/modules/FindSUNDIALS.cmake */ #cmakedefine DEAL_II_SUNDIALS_WITH_IDAS /* cmake/modules/FindSYMENGINE.cmake */ #cmakedefine DEAL_II_SYMENGINE_WITH_LLVM /* cmake/configure/configure_20_boost.cmake */ #cmakedefine DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS /* cmake/configure/configure_50_cgal.cmake */ #cmakedefine DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES /* cmake/configure/configure_2_trilinos.cmake */ #cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD #cmakedefine DEAL_II_TRILINOS_WITH_AMESOS2 #cmakedefine DEAL_II_TRILINOS_WITH_BELOS #cmakedefine DEAL_II_TRILINOS_WITH_EPETRAEXT #cmakedefine DEAL_II_TRILINOS_WITH_IFPACK2 #cmakedefine DEAL_II_TRILINOS_WITH_MUELU #cmakedefine DEAL_II_TRILINOS_WITH_NOX #cmakedefine DEAL_II_TRILINOS_WITH_ROL #cmakedefine DEAL_II_TRILINOS_WITH_SACADO #cmakedefine DEAL_II_TRILINOS_WITH_SEACAS #cmakedefine DEAL_II_TRILINOS_WITH_TPETRA #cmakedefine DEAL_II_TRILINOS_WITH_ZOLTAN #if defined(DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS) || \ defined(DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES) # ifndef BOOST_ALLOW_DEPRECATED_HEADERS # define BOOST_ALLOW_DEPRECATED_HEADERS # endif #endif /*********************************************************************** * Various macros for version number query and comparison: * * These macros are defined to make testing for specific versions within * the deal.II main code as simple as possible. */ /* * deal.II: */ /** * Returns true if the used deal.II version is greater or equal than the * version specified by the three arguments. The internal implementation * assumes that the number of minor and subminor versions is not larger * than 100. */ #define DEAL_II_VERSION_GTE(major,minor,subminor) \ ((DEAL_II_VERSION_MAJOR * 10000 + \ DEAL_II_VERSION_MINOR * 100 + \ DEAL_II_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) /* * boost: */ #define DEAL_II_BOOST_VERSION_MAJOR @BOOST_VERSION_MAJOR@ #define DEAL_II_BOOST_VERSION_MINOR @BOOST_VERSION_MINOR@ #define DEAL_II_BOOST_VERSION_SUBMINOR @BOOST_VERSION_SUBMINOR@ #define DEAL_II_BOOST_VERSION_GTE(major,minor,subminor) \ ((DEAL_II_BOOST_VERSION_MAJOR * 100000 + \ DEAL_II_BOOST_VERSION_MINOR * 100 + \ DEAL_II_BOOST_VERSION_SUBMINOR) \ >= \ (major)*100000 + (minor)*100 + (subminor)) /* * Gmsh: */ #ifdef DEAL_II_WITH_GMSH # define DEAL_II_GMSH_EXECUTABLE_PATH "@GMSH_EXECUTABLE@" #endif /** * Kokkos: */ #ifdef DEAL_II_WITH_KOKKOS # define DEAL_II_KOKKOS_VERSION_MAJOR @KOKKOS_VERSION_MAJOR@ # define DEAL_II_KOKKOS_VERSION_MINOR @KOKKOS_VERSION_MINOR@ # define DEAL_II_KOKKOS_VERSION_SUBMINOR @KOKKOS_VERSION_SUBMINOR@ # define DEAL_II_KOKKOS_VERSION_GTE(major,minor,subminor) \ ((DEAL_II_KOKKOS_VERSION_MAJOR * 10000 + \ DEAL_II_KOKKOS_VERSION_MINOR * 100 + \ DEAL_II_KOKKOS_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) #endif /** * OpenCASCADE: */ #ifdef DEAL_II_WITH_OPENCASCADE # define DEAL_II_OPENCASCADE_VERSION_MAJOR @OPENCASCADE_VERSION_MAJOR@ # define DEAL_II_OPENCASCADE_VERSION_MINOR @OPENCASCADE_VERSION_MINOR@ # define DEAL_II_OPENCASCADE_VERSION_SUBMINOR @OPENCASCADE_VERSION_SUBMINOR@ # define DEAL_II_OPENCASCADE_VERSION_GTE(major,minor,subminor) \ ((DEAL_II_OPENCASCADE_VERSION_MAJOR * 10000 + \ DEAL_II_OPENCASCADE_VERSION_MINOR * 100 + \ DEAL_II_OPENCASCADE_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) #endif /* * p4est: */ #ifdef DEAL_II_WITH_P4EST # define DEAL_II_P4EST_VERSION_MAJOR @P4EST_VERSION_MAJOR@ # define DEAL_II_P4EST_VERSION_MINOR @P4EST_VERSION_MINOR@ # define DEAL_II_P4EST_VERSION_SUBMINOR @P4EST_VERSION_SUBMINOR@ # define DEAL_II_P4EST_VERSION_PATCH @P4EST_VERSION_PATCH@ # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \ ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \ DEAL_II_P4EST_VERSION_MINOR * 10000 + \ DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \ DEAL_II_P4EST_VERSION_PATCH) \ >= \ (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch)) #endif /* * SUNDIALS: */ #ifdef DEAL_II_WITH_SUNDIALS # define DEAL_II_SUNDIALS_VERSION_MAJOR @SUNDIALS_VERSION_MAJOR@ # define DEAL_II_SUNDIALS_VERSION_MINOR @SUNDIALS_VERSION_MINOR@ # define DEAL_II_SUNDIALS_VERSION_PATCH @SUNDIALS_VERSION_PATCH@ #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \ ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \ DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \ DEAL_II_SUNDIALS_VERSION_PATCH) \ >= \ (major)*10000 + (minor)*100 + (patch)) #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \ ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \ DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \ DEAL_II_SUNDIALS_VERSION_PATCH) \ < \ (major)*10000 + (minor)*100 + (patch)) #endif /* * PETSc: * * Note: The following macros are defined in petscversion.h * so we simply refer to the ones there. */ #ifdef DEAL_II_WITH_PETSC # include # define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \ PETSC_VERSION_LT(major,minor,subminor) # define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \ PETSC_VERSION_GE(major,minor,subminor) #endif /* * SLEPC: */ #ifdef DEAL_II_WITH_SLEPC # include # define DEAL_II_SLEPC_VERSION_LT(major,minor,subminor) \ SLEPC_VERSION_LT(major,minor,subminor) # define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \ SLEPC_VERSION_GE(major,minor,subminor) #endif /* * Trilinos: */ #ifdef DEAL_II_WITH_TRILINOS # define DEAL_II_TRILINOS_VERSION_MAJOR @TRILINOS_VERSION_MAJOR@ # define DEAL_II_TRILINOS_VERSION_MINOR @TRILINOS_VERSION_MINOR@ # define DEAL_II_TRILINOS_VERSION_SUBMINOR @TRILINOS_VERSION_SUBMINOR@ # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \ ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \ DEAL_II_TRILINOS_VERSION_MINOR * 100 + \ DEAL_II_TRILINOS_VERSION_SUBMINOR) \ >= \ (major)*10000 + (minor)*100 + (subminor)) #endif /* * CGAL: */ #ifdef DEAL_II_WITH_CGAL # define DEAL_II_CGAL_VERSION_MAJOR @CGAL_VERSION_MAJOR@ # define DEAL_II_CGAL_VERSION_MINOR @CGAL_VERSION_MINOR@ # define DEAL_II_CGAL_VERSION_SUBMINOR @CGAL_VERSION_SUBMINOR@ # define DEAL_II_CGAL_VERSION_GTE(major, minor, subminor) \ ((DEAL_II_CGAL_VERSION_MAJOR * 10000 + DEAL_II_CGAL_VERSION_MINOR * 100 + \ DEAL_II_CGAL_VERSION_SUBMINOR) >= \ (major)*10000 + (minor)*100 + (subminor)) #endif /* * MPI */ #ifdef DEAL_II_WITH_MPI # define DEAL_II_MPI_VERSION_MAJOR @MPI_VERSION_MAJOR@ # define DEAL_II_MPI_VERSION_MINOR @MPI_VERSION_MINOR@ # define DEAL_II_MPI_VERSION_GTE(major,minor) \ ((DEAL_II_MPI_VERSION_MAJOR * 100 + \ DEAL_II_MPI_VERSION_MINOR) \ >= \ (major)*100 + (minor)) #else # define DEAL_II_MPI_VERSION_GTE(major,minor) false #endif #cmakedefine DEAL_II_MPI_WITH_DEVICE_SUPPORT /*********************************************************************** * Two macros to guard external header includes. * * Selectively disable diagnostics set by "-Wextra" (and similar flags) for * GCC and compiler accepting GCC dialects (such as clang). * "diagnostic push" is supported since gcc-4.6 and clang-3.3. */ #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA /* keep pragmas with an exclamation mark in order.. */ # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \ _Pragma("GCC diagnostic push") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Wpragmas\"") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Wextra\"") /*!*/ \ _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \ _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"") \ _Pragma("GCC diagnostic ignored \"-Wcpp\"") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-volatile\"") \ _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \ _Pragma("GCC diagnostic ignored \"-Wfloat-conversion\"") \ _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \ _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \ _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \ _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \ _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") \ _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \ _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \ _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \ _Pragma("GCC diagnostic ignored \"-Wnon-template-friend\"") \ _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \ _Pragma("GCC diagnostic ignored \"-Wnonnull\"") \ _Pragma("GCC diagnostic ignored \"-Woverflow\"") \ _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \ _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ _Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \ _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \ _Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \ _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \ _Pragma("GCC diagnostic ignored \"-Wundef\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \ _Pragma("GCC diagnostic ignored \"-Wuse-after-free\"") \ _Pragma("GCC diagnostic warning \"-Wpragmas\"") /*!*/ # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \ _Pragma("GCC diagnostic pop") #else # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #endif /*********************************************************************** * Define macros for picking the correct C linkage name for a Fortran function. * See cmake/configure/configure_fortran_mangling.cmake for more information. */ #define DEAL_II_FORTRAN_MANGLE(name, NAME) @DEAL_II_FORTRAN_MANGLE@ #define DEAL_II_FORTRAN_MANGLE_UNDERSCORE(name, NAME) @DEAL_II_FORTRAN_MANGLE_UNDERSCORE@ /*********************************************************************** * Define a portable preprocessor macro that generates custom warnings * reporting the line and the file where the warning appears. Taken from: * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html */ #ifdef _MSC_VER #define DEAL_II_STRINGIZE_HELPER(x) #x #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x) #define DEAL_II_DO_PRAGMA(x) __pragma(x) #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc)) #else #define DEAL_II_DO_PRAGMA(x) _Pragma(#x) #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc)) #endif /*********************************************************************** * Final inclusions: */ /* * Include the boost version header to do a quick version check in case, by * accident, we have configured with one version of boost but are compiling * either the library or an external application with a different version of * boost. */ #include static_assert( BOOST_VERSION == 100000 * DEAL_II_BOOST_VERSION_MAJOR + 100 * DEAL_II_BOOST_VERSION_MINOR + DEAL_II_BOOST_VERSION_SUBMINOR, "The version number of boost that you are compiling with does not match the " "version number of boost found during deal.II's configuration step. This " "leads to difficult to understand bugs and is not supported. Please check " "that you have set up your application with the same version of boost as " "deal.II."); #endif