From: Wolfgang Bangerth Date: Mon, 2 Sep 2013 22:43:57 +0000 (+0000) Subject: Introduce a macro to compare p4est version numbers. X-Git-Tag: v8.1.0~907 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed4ac2765acec6b34cb39d66f214d633043b9df4;p=dealii.git Introduce a macro to compare p4est version numbers. git-svn-id: https://svn.dealii.org/trunk@30560 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/config.h.in b/deal.II/include/deal.II/base/config.h.in index fff3e01930..ad1681b62e 100644 --- a/deal.II/include/deal.II/base/config.h.in +++ b/deal.II/include/deal.II/base/config.h.in @@ -353,6 +353,25 @@ # 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