MFEM  v4.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, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 
13 // Support out-of-source builds: if MFEM_BUILD_DIR is defined, load the config
14 // file MFEM_BUILD_DIR/config/_config.hpp.
15 //
16 // Otherwise, use the local file: _config.hpp.
17 
18 #ifndef MFEM_CONFIG_HPP
19 #define MFEM_CONFIG_HPP
20 
21 #ifdef MFEM_BUILD_DIR
22 #define MFEM_QUOTE(a) #a
23 #define MFEM_MAKE_PATH(x,y) MFEM_QUOTE(x/y)
24 #include MFEM_MAKE_PATH(MFEM_BUILD_DIR,config/_config.hpp)
25 #else
26 #include "_config.hpp"
27 #endif
28 
29 // Common configuration macros
30 
31 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__)
32 #define MFEM_HAVE_GCC_PRAGMA_DIAGNOSTIC
33 #endif
34 
35 // Windows specific options
36 #ifdef _WIN32
37 // Macro needed to get defines like M_PI from <cmath>. (Visual Studio C++ only?)
38 #define _USE_MATH_DEFINES
39 #endif
40 
41 // Check dependencies:
42 
43 // Options that require MPI
44 #ifndef MFEM_USE_MPI
45 #ifdef MFEM_USE_SUPERLU
46 #error Building with SuperLU_DIST (MFEM_USE_SUPERLU=YES) requires MPI (MFEM_USE_MPI=YES)
47 #endif
48 #ifdef MFEM_USE_STRUMPACK
49 #error Building with STRUMPACK (MFEM_USE_STRUMPACK=YES) requires MPI (MFEM_USE_MPI=YES)
50 #endif
51 #ifdef MFEM_USE_PETSC
52 #error Building with PETSc (MFEM_USE_PETSC=YES) requires MPI (MFEM_USE_MPI=YES)
53 #endif
54 #ifdef MFEM_USE_PUMI
55 #error Building with PUMI (MFEM_USE_PUMI=YES) requires MPI (MFEM_USE_MPI=YES)
56 #endif
57 #endif // MFEM_USE_MPI not defined
58 
59 #endif // MFEM_CONFIG_HPP