Skip to content
Snippets Groups Projects
config.h.cmake 4.79 KiB
Newer Older
René Fritze's avatar
René Fritze committed
// This file is part of the dune-xt project:
//   https://github.com/dune-community/dune-xt
// Copyright 2009-2020 dune-xt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
//      or  GPL-2.0+ (http://opensource.org/licenses/gpl-license)
//          with "runtime exception" (http://www.dune-project.org/license.html)
René Fritze's avatar
René Fritze committed
// Authors:
//   Felix Schindler (2013 - 2018)
René Fritze's avatar
René Fritze committed
//   René Fritze     (2013 - 2019)
//   Tobias Leibner  (2014, 2016 - 2020)
/* begin dune-xt */
// NEVER delete/alter above comment, dune's cmake relies on it
// this precludes clang-tidy and co. from issuing warnings for this file
#pragma GCC system_header

/* Define to the version of dune-xt */
#define DUNE_XT_VERSION ${DUNE_XT_VERSION}
/* Define to the major version of dune-xt */
#define DUNE_XT_VERSION_MAJOR ${DUNE_XT_VERSION_MAJOR}
/* Define to the minor version of dune-xt */
#define DUNE_XT_VERSION_MINOR ${DUNE_XT_VERSION_MINOR}
/* Define to the revision of dune-xt */
#define DUNE_XT_VERSION_REVISION ${DUNE_XT_VERSION_REVISION}
#ifndef HAVE_CBLAS
#define HAVE_EIGEN ENABLE_EIGEN
Tobias Leibner's avatar
Tobias Leibner committed
#ifndef HAVE_CLP
Tobias Leibner's avatar
Tobias Leibner committed
#endif

#ifndef HAVE_QHULL
#endif

#ifndef HAVE_LPSOLVE
#cmakedefine01 HAVE_LPSOLVE
#ifndef HAVE_LAPACKE
#cmakedefine01 HAVE_LAPACKE
#ifndef HAVE_MKL
#ifndef HAVE_TBB
#ifndef DXT_DISABLE_LARGE_TESTS
#define DXT_DISABLE_LARGE_TESTS 0
#endif

#cmakedefine01 ENABLE_PERFMON
#if ENABLE_PERFMON && HAVE_LIKWID
#define LIKWID_PERFMON 1
#cmakedefine01 HAVE_MAP_EMPLACE

#cmakedefine01 HAS_WORKING_UNUSED_ATTRIBUTE
#ifndef DS_MAX_MIC_THREADS
#define DS_MAX_MIC_THREADS ${DS_MAX_MIC_THREADS}
#ifndef HAVE_DUNE_FEM_PARAMETER_REPLACE
#define HAVE_DUNE_FEM_PARAMETER_REPLACE 0
/* needed in dune/xt/common/profiler.hh */
#ifndef DUNE_XT_DO_TIMING
#define DUNE_XT_DO_TIMING 0
#cmakedefine01 DUNE_XT_WITH_PYTHON_BINDINGS

/*** Silence implicitly False evaluation of undefined macro warnings ****/
#ifndef HAVE_DUNE_FEM
#ifndef HAVE_DUNE_GRID_MULTISCALE
#define HAVE_DUNE_GRID_MULTISCALE 0
#ifndef HAVE_DUNE_GRID_GLUE
#define HAVE_DUNE_GRID_GLUE 0
#endif

#ifndef ENABLE_ALBERTA
#define ENABLE_ALBERTA 0
#endif

#ifndef HAVE_DUNE_SPGRID
#define HAVE_DUNE_SPGRID 0
#ifndef HAVE_EMPLACE
#ifndef HAVE_FASP
#define HAVE_FASP 0
#endif

#ifndef ENABLE_SUPERLU
#define ENABLE_SUPERLU 0
#define ENABLE_UMFPACK 0
Tobias Leibner's avatar
Tobias Leibner committed
#ifndef HAVE_UG
#define HAVE_UG 0
#endif

#ifndef ENABLE_BOOST
#endif

#ifndef ENABLE_PETSC
#endif

#ifndef ENABLE_MPI
#ifndef HAVE_MPI
#ifndef HAVE_CONSTEXPR
#define HAVE_CONSTEXPR 0
#endif

#ifndef DUNE_FEM_COMPATIBILITY
#define DUNE_FEM_COMPATIBILITY 0
#endif

/*** End: Silence implicitly False evaluation of undefined macro warnings ****/

Tobias Leibner's avatar
Tobias Leibner committed
#if HAVE_TBB && defined(BOOST_CLANG)
  // Hack to fix compilation with clang as tbb does not detect C++11 feature correctly for clang. Recent versions of TBB
  // allow to set the macro TBB_USE_GLIBCXX_VERSION to the proper version of libstdc++ to fix this issue, see
  // https://www.threadingbuildingblocks.org/docs/help/reference/appendices/known_issues/linux_os.html. For older versions
  // we need the hack below.
  #define TBB_USE_GLIBCXX_VERSION 40902
  // new versions of tbb do not have tbb_stddef.h anymore
  #if __has_include("tbb/version.h")
  #  include "tbb/version.h"
  #else
  #  include "tbb/tbb_stddef.h"
  #endif
  #if TBB_INTERFACE_VERSION < 4400
    #include <tbb/tbb_config.h>
    #undef __TBB_CPP11_RVALUE_REF_PRESENT
    #undef __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT
    #undef __TBB_CPP11_DECLTYPE_PRESENT
    #undef __TBB_CPP11_LAMBDAS_PRESENT
    #define __TBB_CPP11_RVALUE_REF_PRESENT 1
    #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT 1
    #define __TBB_CPP11_DECLTYPE_PRESENT 1
    #define __TBB_CPP11_LAMBDAS_PRESENT 1
  #endif // TBB_INTERFACE_VERSION < 4400
#endif // HAVE_TBB

// This is an unfortunate hack, see the header for an explanation.
#include <dune/xt/common/fix-ambiguous-std-math-overloads.hh>
/* end dune-xt */
// NEVER delete/alter above comment, dune's cmake relies on it