From ed4ac2765acec6b34cb39d66f214d633043b9df4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 2 Sep 2013 22:43:57 +0000 Subject: [PATCH] Introduce a macro to compare p4est version numbers. git-svn-id: https://svn.dealii.org/trunk@30560 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/config.h.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- 2.39.5