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