summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-24 11:14:35 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-24 11:23:19 (GMT)
commit4bf102418bb1dbc93d9c6ce36dff5b5b1550df9c (patch)
tree008ed8a44a09c427d74064d651b81ccd8d49d34d
parentd421274e3e11a0e6480358faa8a8e5cf48d7b3c2 (diff)
downloadCMake-4bf102418bb1dbc93d9c6ce36dff5b5b1550df9c.zip
CMake-4bf102418bb1dbc93d9c6ce36dff5b5b1550df9c.tar.gz
CMake-4bf102418bb1dbc93d9c6ce36dff5b5b1550df9c.tar.bz2
FindXalanC: Fix version parsing for XalanC 1.12
The version header now puts parentheses around the components. Fixes: #21010
-rw-r--r--Modules/FindXalanC.cmake6
1 files 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!")