MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
config.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
11 
12 
13 // Support out-of-source builds: if MFEM_CONFIG_FILE is defined, include it.
14 //
15 // Otherwise, use the local file: _config.hpp.
16 
17 #ifndef MFEM_CONFIG_HPP
18 #define MFEM_CONFIG_HPP
19 
20 #ifdef MFEM_CONFIG_FILE
21 #include MFEM_CONFIG_FILE
22 #else
23 #include "_config.hpp"
24 #endif
25 
26 // Common configuration macros
27 
28 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__)
29 #define MFEM_HAVE_GCC_PRAGMA_DIAGNOSTIC
30 #endif
31 
32 // Windows specific options
33 #ifdef _WIN32
34 // Macro needed to get defines like M_PI from <cmath>. (Visual Studio C++ only?)
35 #define _USE_MATH_DEFINES
36 #endif
37 
38 // Check dependencies:
39 
40 // Options that require MPI
41 #ifndef MFEM_USE_MPI
42 #ifdef MFEM_USE_SUPERLU
43 #error Building with SuperLU_DIST (MFEM_USE_SUPERLU=YES) requires MPI (MFEM_USE_MPI=YES)
44 #endif
45 #ifdef MFEM_USE_STRUMPACK
46 #error Building with STRUMPACK (MFEM_USE_STRUMPACK=YES) requires MPI (MFEM_USE_MPI=YES)
47 #endif
48 #ifdef MFEM_USE_PETSC
49 #error Building with PETSc (MFEM_USE_PETSC=YES) requires MPI (MFEM_USE_MPI=YES)
50 #endif
51 #ifdef MFEM_USE_PUMI
52 #error Building with PUMI (MFEM_USE_PUMI=YES) requires MPI (MFEM_USE_MPI=YES)
53 #endif
54 #endif // MFEM_USE_MPI not defined
55 
56 #endif // MFEM_CONFIG_HPP