From 841415ca740608e9b5ec075a47cbc78a8c63c837 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 23 Jul 2014 10:44:43 -0500 Subject: [PATCH] Add some description of when the last two IFs can happen in version number recognition. --- cmake/modules/FindP4EST.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindP4EST.cmake b/cmake/modules/FindP4EST.cmake index 44846c7930..ae6f5fd2f4 100644 --- a/cmake/modules/FindP4EST.cmake +++ b/cmake/modules/FindP4EST.cmake @@ -141,7 +141,12 @@ IF(EXISTS ${P4EST_INCLUDE_DIR}/p4est_config.h) # # We cannot rely on the fact that SUBMINOR or PATCH are defined. # Nevertheless, we need a full version number for our preprocessor macros - # to work. Therefore, set those numbers to 0 if necessary. + # to work. If the p4est version number is only of the form x.y instead of + # a.b.c.d, then the last two REGEX_REPLACE calls above will have failed + # because the regular expression didn't match the version string, + # and P4EST_VERSION_SUBMINOR and P4EST_VERSION_PATCH will either be + # empty or be the full version string. In those cases, set those numbers + # to 0 if necessary. # IF("${P4EST_VERSION_SUBMINOR}" MATCHES "^(|${P4EST_VERSION})$") SET(P4EST_VERSION_SUBMINOR "0") -- 2.39.5