From: Wolfgang Bangerth Date: Fri, 31 Oct 2014 18:48:20 +0000 (-0500) Subject: Introduce a macro DEAL_II_VERSION_GTE. X-Git-Tag: v8.2.0-rc1~91^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b6cfaf24e5314a87f1bc72e1ef82da21e0f962d;p=dealii.git Introduce a macro DEAL_II_VERSION_GTE. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 7dc07cdaca..e7bc34b50b 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -325,6 +325,15 @@ inconvenience this causes.

Specific improvements

    +
  1. New: There is now a macro DEAL_II_VERSION_GTE + that can be used to test whether the deal.II version is greater + than or equal a particular version number. This is useful if you + need to make application programs compatible with different + deal.II releases. +
    + (Wolfgang Bangerth, 2014/10/31) +
  2. +
  3. Changed: PETSc and Trilinos vectors with ghost entries can now be reset to zero using = 0.0;
    diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 43e5e14f68..9a99d19aaf 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -50,6 +50,13 @@ #define DEAL_II_VERSION_MINOR @DEAL_II_VERSION_MINOR@ #define DEAL_II_MINOR @DEAL_II_VERSION_MINOR@ +#define DEAL_II_VERSION_GTE(major,minor,subminor) \ + ((DEAL_II_VERSION_MAJOR * 10000 + \ + DEAL_II_VERSION_MINOR * 100 + \ + DEAL_II_VERSION_SUBMINOR) \ + >= \ + (major)*10000 + (minor)*100 + (subminor)) + /******************************************** * Configured in check_1_compiler_features: *