From 4b6cfaf24e5314a87f1bc72e1ef82da21e0f962d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 31 Oct 2014 13:48:20 -0500 Subject: [PATCH] Introduce a macro DEAL_II_VERSION_GTE. --- doc/news/changes.h | 9 +++++++++ include/deal.II/base/config.h.in | 7 +++++++ 2 files changed, 16 insertions(+) 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: * -- 2.39.5