]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Introduce a macro to compare p4est version numbers.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Sep 2013 22:43:57 +0000 (22:43 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Sep 2013 22:43:57 +0000 (22:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@30560 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/config.h.in

index fff3e01930294070c354a08abf63cbdc6f28c892..ad1681b62e5c5e08fe3ba3ec6f9c8a573ace4081 100644 (file)
 #  define DEAL_II_P4EST_VERSION_SUBMINOR @P4EST_VERSION_SUBMINOR@
 #  define DEAL_II_P4EST_VERSION_PATCH @P4EST_VERSION_PATCH@
 
+#  define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
+ ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
+    DEAL_II_P4EST_VERSION_MINOR * 10000 + \
+     DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
+      DEAL_II_P4EST_VERSION_PATCH) \
+    >=  \
+    (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
+#else
+  // p4est up to 0.3.4.1 didn't define P4EST_VERSION_*. since
+  // we didn't supports anything before 0.3.4, we assume 0.3.4
+  // This means that we can't use the new features in 0.3.4.1
+#  define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
+  ((0 * 1000000 + \
+    3 * 10000 + \
+    4 * 100 + \
+    0) \
+    >=  \
+    (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
+
 #endif
 
 

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.