From 4bf102418bb1dbc93d9c6ce36dff5b5b1550df9c Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 24 Jul 2020 07:14:35 -0400 Subject: FindXalanC: Fix version parsing for XalanC 1.12 The version header now puts parentheses around the components. Fixes: #21010 --- Modules/FindXalanC.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/FindXalanC.cmake b/Modules/FindXalanC.cmake index 3adaa44..54783e3 100644 --- a/Modules/FindXalanC.cmake +++ b/Modules/FindXalanC.cmake @@ -47,9 +47,9 @@ The following cache variables may also be set: function(_XalanC_GET_VERSION version_hdr) file(STRINGS ${version_hdr} _contents REGEX "^[ \t]*#define XALAN_VERSION_.*") if(_contents) - string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" XalanC_MAJOR "${_contents}") - string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" XalanC_MINOR "${_contents}") - string(REGEX REPLACE "[^*]*#define XALAN_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" XalanC_PATCH "${_contents}") + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MAJOR[ \t(]+([0-9]+).*" "\\1" XalanC_MAJOR "${_contents}") + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MINOR[ \t(]+([0-9]+).*" "\\1" XalanC_MINOR "${_contents}") + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_REVISION[ \t(]+([0-9]+).*" "\\1" XalanC_PATCH "${_contents}") if(NOT XalanC_MAJOR MATCHES "^[0-9]+$") message(FATAL_ERROR "Version parsing failed for XALAN_VERSION_MAJOR!") -- cgit v0.12