diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 984fe60ab0b9c30f29561f3e21b8e72c8c951fb5..8a08dfb855d3a09196227ec69593ef0087302adf 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -32,9 +32,13 @@ #include <dune/common/version.hh> -#if DUNE_VERSION_NEWER_REV(DUNE_COMMON, 2, 1, 0) +#define HAVE_DUNE21 \ + (DUNE_COMMON_VERSION_MAJOR > 2 \ + || (DUNE_COMMON_VERSION_MAJOR == 2 && DUNE_COMMON_VERSION_MINOR >= 1)) + +#if HAVE_DUNE21 #include <dune/common/parametertreeparser.hh> -#endif // DUNE_VERSION_NEWER_REV(DUNE_COMMON, 2, 1, 0) +#endif // HAVE_DUNE21 namespace Dumux @@ -234,7 +238,7 @@ int startWithGrid(const typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) &grid, return 3; }; -#if DUNE_VERSION_NEWER_REV(DUNE_COMMON, 2, 1, 0) +#if HAVE_DUNE21 // requires DUNE 2.1 and above /*! @@ -331,7 +335,7 @@ int startFromInputFile(int argc, char **argv) return 3; } -#endif // DUNE_VERSION_NEWER_REV(DUNE_COMMON, 2, 1, 0) +#endif //HAVE_DUNE21 }