deal.II version 9.8.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2012 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_config_h
14#define dealii_config_h
15
16/***********************************************************************
17 * Some deal.II macros depends on Kokkos macros:
18 */
19#include <Kokkos_Macros.hpp>
20
21/***********************************************************************
22 * Information about deal.II:
23 */
24
25#define DEAL_II_PACKAGE_NAME "deal.II"
26
27#define DEAL_II_PACKAGE_VERSION "9.8.0"
28
29#define DEAL_II_VERSION_MAJOR 9
30#define DEAL_II_VERSION_MINOR 8
31#define DEAL_II_VERSION_SUBMINOR 0
32
33/***********************************************************************
34 * Two macro names that we put at the top and bottom of all deal.II files
35 * and that will be expanded to "namespace dealii {" and "}".
36 */
37
38#define DEAL_II_NAMESPACE_OPEN namespace dealii {
39#define DEAL_II_NAMESPACE_CLOSE }
40
41/***********************************************************************
42 * A variable that can be used to query whether we are compiling in
43 * debug or release mode.
44 */
45
47
58
65#ifdef DEBUG
67#else
69#endif
70
71
76constexpr bool running_in_debug_mode()
77{
79}
80
81
83
84
85/***********************************************************************
86 * Configured deal.II features:
87 */
88
89/* #undef DEAL_II_WITH_64BIT_INDICES */
90#define DEAL_II_WITH_ADOLC
91#define DEAL_II_WITH_ARPACK
92/* #undef DEAL_II_WITH_ARBORX */
93#define DEAL_II_WITH_ASSIMP
94/* #undef DEAL_II_FEATURE_BOOST_BUNDLED_CONFIGURED */
95#define DEAL_II_WITH_CGAL
96/* #undef DEAL_II_WITH_COMPLEX_VALUES */
97#define DEAL_II_WITH_GINKGO
98#define DEAL_II_WITH_GMSH
99#define DEAL_II_WITH_GSL
100/* #undef DEAL_II_WITH_HDF5 */
101/* #undef DEAL_II_WITH_NETCDF */
102#define DEAL_II_WITH_KOKKOS
103/* #undef DEAL_II_FEATURE_KOKKOS_BUNDLED_CONFIGURED */
104#define DEAL_II_WITH_LAPACK
105/* #undef LAPACK_WITH_64BIT_BLAS_INDICES */
106/* #undef DEAL_II_LAPACK_WITH_MKL */
107#define DEAL_II_WITH_MAGIC_ENUM
108/* #undef DEAL_II_FEATURE_MAGIC_ENUM_BUNDLED_CONFIGURED */
109#define DEAL_II_WITH_METIS
110/* #undef DEAL_II_WITH_MPI */
111/* #undef DEAL_II_WITH_MUMPS */
112#define DEAL_II_WITH_MUPARSER
113/* #undef DEAL_II_FEATURE_MUPARSER_BUNDLED_CONFIGURED */
114/* #undef DEAL_II_WITH_OPENCASCADE */
115/* #undef DEAL_II_WITH_P4EST */
116/* #undef DEAL_II_WITH_PETSC */
117/* #undef DEAL_II_WITH_PSBLAS */
118/* #undef DEAL_II_WITH_SCALAPACK */
119/* #undef DEAL_II_WITH_SLEPC */
120/* #undef DEAL_II_WITH_SUNDIALS */
121#define DEAL_II_WITH_SYMENGINE
122#define DEAL_II_WITH_TASKFLOW
123/* #undef DEAL_II_FEATURE_TASKFLOW_BUNDLED_CONFIGURED */
124#define DEAL_II_WITH_TBB
125/* #undef DEAL_II_WITH_TRILINOS */
126#define DEAL_II_WITH_UMFPACK
127/* #undef DEAL_II_FEATURE_UMFPACK_BUNDLED_CONFIGURED */
128#define DEAL_II_USE_VECTORIZATION_GATHER
129/* #undef DEAL_II_WITH_VTK */
130#define DEAL_II_WITH_ZLIB
131
132#ifdef DEAL_II_WITH_TBB
137#define DEAL_II_WITH_THREADS
138
139#define TBB_SUPPRESS_DEPRECATED_MESSAGES 1
140
141#define DEAL_II_TBB_WITH_ONEAPI
142
143#endif
144
145/***********************************************************************
146 * Compiler bugs:
147 *
148 * For documentation see cmake/checks/check_03_compiler_bugs.cmake
149 */
150
151/* #undef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG */
152
153/***********************************************************************
154 * Compiler features:
155 *
156 * For documentation see cmake/checks/check_01_compiler_features.cmake
157 */
158
159#define DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS
160/* #undef DEAL_II_VECTOR_ITERATOR_IS_POINTER */
161#define DEAL_II_HAVE_BUILTIN_EXPECT
162#define DEAL_II_HAVE_GLIBC_STACKTRACE
163#define DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
164/* #undef __PRETTY_FUNCTION__ */
165#define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
166#define DEAL_II_RESTRICT __restrict
167#define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
168
169
170#define DEAL_II_HOST_DEVICE KOKKOS_FUNCTION
171#define DEAL_II_HOST_DEVICE_ALWAYS_INLINE KOKKOS_FORCEINLINE_FUNCTION
172
173// clang++ assumes that all constexpr functions are __host__ __device__ when
174// Kokkos was configured with CUDA or HIP support. This is problematic
175// when calling non-constexpr functions in constexpr functions. Hence, we
176// need a way to annotate functions explicitly as host-only.
177/* #undef DEAL_II_KOKKOS_ENABLE_HIP */
178#if (defined(__clang__) && defined(__CUDA__)) || defined(DEAL_II_KOKKOS_ENABLE_HIP)
179# define DEAL_II_HOST __host__
180#else
181# define DEAL_II_HOST
182#endif
183
184
185/***********************************************************************
186 * CPU features:
187 *
188 * For documentation see cmake/checks/check_01_cpu_features.cmake
189 */
190
191/* #undef DEAL_II_WORDS_BIGENDIAN */
192
193/*
194 * This sets the largest number of vectorization bits detected for the given
195 * compiler flags and hardware (e.g. 256 for AVX on x86-64 architectures) for
196 * use in deal.II's intrinsics-based VectorizedArray class.
197 */
198#define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128
199
200/*
201 * Backward compatibility setting
202 */
203#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512
204#define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3
205#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256
206#define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2
207#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128
208#define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
209#else
210#define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
211#endif
212
213#define DEAL_II_OPENMP_SIMD_PRAGMA _Pragma("omp simd")
214
215
216/***********************************************************************
217 * Language features:
218 *
219 * For documentation see cmake/checks/check_01_cxx_features.cmake
220 */
221
222/* #undef DEAL_II_HAVE_CXX14 */
223#define DEAL_II_HAVE_CXX17
224#define DEAL_II_HAVE_CXX20
225/* #undef DEAL_II_HAVE_CXX23 */
226/* #undef DEAL_II_HAVE_CXX26 */
227
228#define DEAL_II_HAVE_FP_EXCEPTIONS
229/* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
230#define DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS
231/* #undef DEAL_II_CXX14_CONSTEXPR_BUG */
232
233// The following three are defined for backwards compatibility with older
234// deal.II versions:
235#define DEAL_II_WITH_CXX11
236#define DEAL_II_WITH_CXX14
237#define DEAL_II_WITH_CXX17
238
245#if defined(DEAL_II_HAVE_CXX20) && !defined(DEAL_II_DOXYGEN_DO_NOT_PARSE_REQUIRES_CLAUSES)
246# define DEAL_II_CXX20_REQUIRES(condition) requires(condition)
247#else
248# define DEAL_II_CXX20_REQUIRES(condition)
249#endif
250
256#ifdef DEAL_II_HAVE_CXX23
257# define DEAL_II_CXX23_ASSUME(expr) [[assume(expr)]]
258#else
259# if defined(__clang__)
260# define DEAL_II_CXX23_ASSUME(expr) __builtin_assume(static_cast<bool>(expr))
261# elif defined(_MSC_VER) || defined(__ICC)
262# define DEAL_II_CXX23_ASSUME(expr) __assume(expr);
263# else
264/* no way with GCC to express this without evaluating 'expr' */
265# define DEAL_II_CXX23_ASSUME(expr) \
266 do \
267 { \
268 } \
269 while (false)
270# endif
271#endif
272
273#define DEAL_II_FALLTHROUGH [[fallthrough]]
274#define DEAL_II_CONSTEXPR constexpr
275
276
277
278/***********************************************************************
279 * Dealing with deprecations.
280 */
281
286#define DEAL_II_DEPRECATED [[deprecated]]
287#define DEAL_II_DEPRECATED_WITH_COMMENT(comment) [[deprecated(comment)]]
288
295/* #undef DEAL_II_EARLY_DEPRECATIONS */
296#ifndef DEAL_II_DEPRECATED_EARLY
297// guard to allow user to override DEAL_II_DEPRECATED_EARLY
298#ifdef DEAL_II_EARLY_DEPRECATIONS
299#define DEAL_II_DEPRECATED_EARLY [[deprecated]]
300#else
301#define DEAL_II_DEPRECATED_EARLY
302#endif
303#endif
304
305#ifndef DEAL_II_DEPRECATED_EARLY_WITH_COMMENT
306// guard to allow user to override DEAL_II_DEPRECATED_EARLY
307#ifdef DEAL_II_EARLY_DEPRECATIONS
308#define DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(comment) [[deprecated(comment)]]
309#else
310#define DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(comment)
311#endif
312#endif
313
314
315/***********************************************************************
316 * System features:
317 *
318 * For documentation see cmake/checks/check_02_system_features.cmake
319 */
320
321#define DEAL_II_HAVE_SYS_RESOURCE_H
322#define DEAL_II_HAVE_UNISTD_H
323#define DEAL_II_HAVE_GETHOSTNAME
324#define DEAL_II_HAVE_GETPID
325/* #undef DEAL_II_HAVE_JN */
326
327/* #undef DEAL_II_MSVC */
328
329
330/***********************************************************************
331 * Feature configuration
332 *
333 * For documentation see cmake/configure/configure_*.cmake and
334 * cmake/modules/Find*.cmake
335 */
336
337/* cmake/modules/FindADOLC.cmake */
338#define DEAL_II_ADOLC_WITH_ATRIG_ERF
339#define DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
340/* #undef DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING */
341
342/* cmake/modules/FindARBORX.cmake */
343#define DEAL_II_ARBORX_WITH_MPI
344
345/* cmake/modules/FindARPACK.cmake */
346/* #undef DEAL_II_ARPACK_WITH_PARPACK */
347
348/* cmake/modules/FindGMSH.cmake */
349#define DEAL_II_GMSH_WITH_API
350
351/* cmake/modules/FindPETSC.cmake */
352/* #undef DEAL_II_PETSC_WITH_COMPLEX */
353/* #undef DEAL_II_PETSC_WITH_HYPRE */
354/* #undef DEAL_II_PETSC_WITH_MUMPS */
355/* #undef DEAL_II_PETSC_WITH_KOKKOS */
356
357/* cmake/modules/FindSUNDIALS.cmake */
358/* #undef DEAL_II_SUNDIALS_WITH_IDAS */
359
360/* cmake/modules/FindSYMENGINE.cmake */
361#define DEAL_II_SYMENGINE_WITH_LLVM
362
363/* cmake/configure/configure_20_boost.cmake */
364/* #undef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS */
365
366/* cmake/configure/configure_50_cgal.cmake */
367#define DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES
368
369/* cmake/configure/configure_2_trilinos.cmake */
370/* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
371/* #undef DEAL_II_TRILINOS_WITH_AMESOS */
372/* #undef DEAL_II_TRILINOS_WITH_AMESOS2 */
373/* #undef DEAL_II_TRILINOS_WITH_AZTECOO */
374/* #undef DEAL_II_TRILINOS_WITH_BELOS */
375/* #undef DEAL_II_TRILINOS_WITH_EPETRA */
376/* #undef DEAL_II_TRILINOS_WITH_EPETRAEXT */
377/* #undef DEAL_II_TRILINOS_WITH_IFPACK */
378/* #undef DEAL_II_TRILINOS_WITH_IFPACK2 */
379/* #undef DEAL_II_TRILINOS_WITH_ML */
380/* #undef DEAL_II_TRILINOS_WITH_MUELU */
381/* #undef DEAL_II_TRILINOS_WITH_NOX */
382/* #undef DEAL_II_TRILINOS_WITH_ROL */
383/* #undef DEAL_II_TRILINOS_WITH_SACADO */
384/* #undef DEAL_II_TRILINOS_WITH_SEACAS */
385/* #undef DEAL_II_TRILINOS_WITH_SHYLU_DDFROSCH */
386/* #undef DEAL_II_TRILINOS_WITH_TEUCHOS */
387/* #undef DEAL_II_TRILINOS_WITH_TPETRA */
388/* #undef DEAL_II_TRILINOS_WITH_TPETRA_INST_COMPLEX_DOUBLE */
389/* #undef DEAL_II_TRILINOS_WITH_TPETRA_INST_COMPLEX_FLOAT */
390/* #undef DEAL_II_TRILINOS_WITH_TPETRA_INST_DOUBLE */
391/* #undef DEAL_II_TRILINOS_WITH_TPETRA_INST_FLOAT */
392/* #undef DEAL_II_TRILINOS_WITH_TPETRA_MUELU */
393/* #undef DEAL_II_TRILINOS_WITH_XPETRA */
394/* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
395
396#if defined(DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS) || \
397 defined(DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES)
398# ifndef BOOST_ALLOW_DEPRECATED_HEADERS
399# define BOOST_ALLOW_DEPRECATED_HEADERS
400# endif
401#endif
402
403/***********************************************************************
404 * Various macros for version number query and comparison:
405 *
406 * These macros are defined to make testing for specific versions within
407 * the deal.II main code as simple as possible.
408 */
409
410/*
411 * deal.II:
412 */
413
420#define DEAL_II_VERSION_GTE(major,minor,subminor) \
421 ((DEAL_II_VERSION_MAJOR * 10000 + \
422 DEAL_II_VERSION_MINOR * 100 + \
423 DEAL_II_VERSION_SUBMINOR) \
424 >= \
425 (major)*10000 + (minor)*100 + (subminor))
426
427/*
428 * boost:
429 */
430#define DEAL_II_BOOST_VERSION_MAJOR 1
431#define DEAL_II_BOOST_VERSION_MINOR 90
432#define DEAL_II_BOOST_VERSION_SUBMINOR 0
433
434#define DEAL_II_BOOST_VERSION_GTE(major,minor,subminor) \
435 ((DEAL_II_BOOST_VERSION_MAJOR * 100000 + \
436 DEAL_II_BOOST_VERSION_MINOR * 100 + \
437 DEAL_II_BOOST_VERSION_SUBMINOR) \
438 >= \
439 (major)*100000 + (minor)*100 + (subminor))
440
441/*
442 * Gmsh:
443 */
444#ifdef DEAL_II_WITH_GMSH
445# define DEAL_II_GMSH_EXECUTABLE_PATH "/usr/bin/gmsh"
446
447# ifdef DEAL_II_GMSH_WITH_API
448# define DEAL_II_GMSH_WITH_API_VERSION_MAJOR 4
449# define DEAL_II_GMSH_WITH_API_VERSION_MINOR 14
450# define DEAL_II_GMSH_WITH_API_VERSION_PATCH 1
451
452# define DEAL_II_GMSH_WITH_API_VERSION_GTE(major, minor, patch) \
453 ((DEAL_II_GMSH_WITH_API_VERSION_MAJOR * 10000 + \
454 DEAL_II_GMSH_WITH_API_VERSION_MINOR * 100 + \
455 DEAL_II_GMSH_WITH_API_VERSION_PATCH) >= \
456 (major)*10000 + (minor)*100 + (patch))
457# endif
458#endif
459
460
464
465#ifdef DEAL_II_WITH_KOKKOS
466# define DEAL_II_KOKKOS_VERSION_MAJOR 4
467# define DEAL_II_KOKKOS_VERSION_MINOR 7
468# define DEAL_II_KOKKOS_VERSION_SUBMINOR 4
469
470# define DEAL_II_KOKKOS_VERSION_GTE(major,minor,subminor) \
471 ((DEAL_II_KOKKOS_VERSION_MAJOR * 10000 + \
472 DEAL_II_KOKKOS_VERSION_MINOR * 100 + \
473 DEAL_II_KOKKOS_VERSION_SUBMINOR) \
474 >= \
475 (major)*10000 + (minor)*100 + (subminor))
476#endif
477
478
482
483#ifdef DEAL_II_WITH_OPENCASCADE
484# define DEAL_II_OPENCASCADE_VERSION_MAJOR 7
485# define DEAL_II_OPENCASCADE_VERSION_MINOR 8
486# define DEAL_II_OPENCASCADE_VERSION_SUBMINOR 1
487
488# define DEAL_II_OPENCASCADE_VERSION_GTE(major,minor,subminor) \
489 ((DEAL_II_OPENCASCADE_VERSION_MAJOR * 10000 + \
490 DEAL_II_OPENCASCADE_VERSION_MINOR * 100 + \
491 DEAL_II_OPENCASCADE_VERSION_SUBMINOR) \
492 >= \
493 (major)*10000 + (minor)*100 + (subminor))
494#endif
495
496/*
497 * p4est:
498 */
499
500#ifdef DEAL_II_WITH_P4EST
501# define DEAL_II_P4EST_VERSION_MAJOR
502# define DEAL_II_P4EST_VERSION_MINOR
503# define DEAL_II_P4EST_VERSION_SUBMINOR
504# define DEAL_II_P4EST_VERSION_PATCH
505
506# define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
507 ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
508 DEAL_II_P4EST_VERSION_MINOR * 10000 + \
509 DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
510 DEAL_II_P4EST_VERSION_PATCH) \
511 >= \
512 (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
513#endif
514
515/*
516 * SUNDIALS:
517 */
518
519#ifdef DEAL_II_WITH_SUNDIALS
520 # define DEAL_II_SUNDIALS_VERSION_MAJOR 7
521 # define DEAL_II_SUNDIALS_VERSION_MINOR 7
522 # define DEAL_II_SUNDIALS_VERSION_PATCH 0
523
524 #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \
525 ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
526 DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
527 DEAL_II_SUNDIALS_VERSION_PATCH) \
528 >= \
529 (major)*10000 + (minor)*100 + (patch))
530
531 #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \
532 ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
533 DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
534 DEAL_II_SUNDIALS_VERSION_PATCH) \
535 < \
536 (major)*10000 + (minor)*100 + (patch))
537#endif
538
539/*
540 * PETSc:
541 *
542 * Note: The following macros are defined in petscversion.h
543 * so we simply refer to the ones there.
544 */
545
546#ifdef DEAL_II_WITH_PETSC
547# include <petscversion.h>
548# define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
549 PETSC_VERSION_LT(major,minor,subminor)
550# define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
551 PETSC_VERSION_GE(major,minor,subminor)
552#endif
553
554/*
555 * SLEPC:
556 */
557
558#ifdef DEAL_II_WITH_SLEPC
559# include <slepcversion.h>
560# define DEAL_II_SLEPC_VERSION_LT(major,minor,subminor) \
561 SLEPC_VERSION_LT(major,minor,subminor)
562# define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
563 SLEPC_VERSION_GE(major,minor,subminor)
564#endif
565
566/*
567 * Trilinos:
568 */
569
570#ifdef DEAL_II_WITH_TRILINOS
571# define DEAL_II_TRILINOS_VERSION_MAJOR
572# define DEAL_II_TRILINOS_VERSION_MINOR
573# define DEAL_II_TRILINOS_VERSION_SUBMINOR
574
575# define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
576 ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
577 DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
578 DEAL_II_TRILINOS_VERSION_SUBMINOR) \
579 >= \
580 (major)*10000 + (minor)*100 + (subminor))
581#endif
582
583/*
584 * CGAL:
585 */
586
587#ifdef DEAL_II_WITH_CGAL
588# define DEAL_II_CGAL_VERSION_MAJOR 6
589# define DEAL_II_CGAL_VERSION_MINOR 1
590# define DEAL_II_CGAL_VERSION_SUBMINOR 0
591
592# define DEAL_II_CGAL_VERSION_GTE(major, minor, subminor) \
593 ((DEAL_II_CGAL_VERSION_MAJOR * 10000 + DEAL_II_CGAL_VERSION_MINOR * 100 + \
594 DEAL_II_CGAL_VERSION_SUBMINOR) >= \
595 (major)*10000 + (minor)*100 + (subminor))
596#endif
597
598/*
599 * MPI
600 */
601
602#ifdef DEAL_II_WITH_MPI
603# define DEAL_II_MPI_VERSION_MAJOR
604# define DEAL_II_MPI_VERSION_MINOR
605
606# define DEAL_II_MPI_VERSION_GTE(major,minor) \
607 ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
608 DEAL_II_MPI_VERSION_MINOR) \
609 >= \
610 (major)*100 + (minor))
611#else
612# define DEAL_II_MPI_VERSION_GTE(major,minor) false
613#endif
614
615/* #undef DEAL_II_MPI_WITH_DEVICE_SUPPORT */
616
617/***********************************************************************
618 * Two macros to guard external header includes.
619 *
620 * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
621 * GCC and compiler accepting GCC dialects (such as clang).
622 * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
623 */
624
625#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
626
627/* keep pragmas with an exclamation mark in order.. */
628# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
629_Pragma("GCC diagnostic push") \
630_Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
631_Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
632_Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
633_Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
634_Pragma("GCC diagnostic ignored \"-Wextra\"") \
635_Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
636_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"") \
637_Pragma("GCC diagnostic ignored \"-Wcpp\"") \
638_Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
639_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
640_Pragma("GCC diagnostic ignored \"-Wdeprecated-volatile\"") \
641_Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
642_Pragma("GCC diagnostic ignored \"-Wfloat-conversion\"") \
643_Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
644_Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
645_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
646_Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
647_Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
648_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") \
649_Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
650_Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
651_Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
652_Pragma("GCC diagnostic ignored \"-Wnon-template-friend\"") \
653_Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
654_Pragma("GCC diagnostic ignored \"-Wnonnull\"") \
655_Pragma("GCC diagnostic ignored \"-Woverflow\"") \
656_Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
657_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
658_Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
659_Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
660_Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \
661_Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
662_Pragma("GCC diagnostic ignored \"-Wundef\"") \
663_Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
664_Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
665_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
666_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
667_Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
668_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
669_Pragma("GCC diagnostic ignored \"-Wuse-after-free\"") \
670_Pragma("GCC diagnostic warning \"-Wpragmas\"")
671
672# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
673_Pragma("GCC diagnostic pop")
674
675#else
676
677# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
678# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
679
680#endif
681
682/***********************************************************************
683 * Define macros for picking the correct C linkage name for a Fortran function.
684 * See cmake/configure/configure_fortran_mangling.cmake for more information.
685 */
686
687#define DEAL_II_FORTRAN_MANGLE(name, NAME) name ## _
688
689#define DEAL_II_FORTRAN_MANGLE_UNDERSCORE(name, NAME) name ## _
690
691/***********************************************************************
692 * Define a portable preprocessor macro that generates custom warnings
693 * reporting the line and the file where the warning appears. Taken from:
694 * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
695 */
696
697#ifdef _MSC_VER
698 #define DEAL_II_STRINGIZE_HELPER(x) #x
699 #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
700 #define DEAL_II_DO_PRAGMA(x) __pragma(x)
701 #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
702#else
703 #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
704 #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
705#endif
706
707
708/***********************************************************************
709 * Final inclusions:
710 */
711
712/*
713 * Include the boost version header to do a quick version check in case, by
714 * accident, we have configured with one version of boost but are compiling
715 * either the library or an external application with a different version of
716 * boost.
717 */
718#include <boost/version.hpp>
719static_assert(
720 BOOST_VERSION == 100000 * DEAL_II_BOOST_VERSION_MAJOR +
723 "The version number of boost that you are compiling with does not match the "
724 "version number of boost found during deal.II's configuration step. This "
725 "leads to difficult to understand bugs and is not supported. Please check "
726 "that you have set up your application with the same version of boost as "
727 "deal.II.");
728
729#endif
#define DEAL_II_BOOST_VERSION_MINOR
Definition config.h:431
constexpr LibraryBuildMode library_build_mode
Definition config.h:66
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
constexpr bool running_in_debug_mode()
Definition config.h:76
#define DEAL_II_BOOST_VERSION_MAJOR
Definition config.h:430
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
LibraryBuildMode
Definition config.h:54
#define DEAL_II_BOOST_VERSION_SUBMINOR
Definition config.h:432