]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce a macro DEAL_II_VERSION_GTE. 217/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 31 Oct 2014 18:48:20 +0000 (13:48 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 31 Oct 2014 18:48:20 +0000 (13:48 -0500)
doc/news/changes.h
include/deal.II/base/config.h.in

index 7dc07cdaca75ed0a83443db2c82f244a5f29cfe1..e7bc34b50b9ccd6c97c8239ff0f69aabd4fc946a 100644 (file)
@@ -325,6 +325,15 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> New: There is now a macro <code>DEAL_II_VERSION_GTE</code>
+  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.
+  <br>
+  (Wolfgang Bangerth, 2014/10/31)
+  </li>
+
   <li> Changed: PETSc and Trilinos vectors with ghost entries can now be reset to zero
   using = 0.0;
   <br>
index 43e5e14f6828cfb2a42120eab5071b068d727274..9a99d19aaf662a2d39970c3aa45ba38385bd67f8 100644 (file)
 #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: *

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.