[NFC] Fix Z3 version detection regexp
authorBalazs Benics <benicsbalazs@gmail.com>
Thu, 26 Mar 2020 11:30:27 +0000 (12:30 +0100)
committerBalazs Benics <benicsbalazs@gmail.com>
Thu, 9 Apr 2020 11:06:22 +0000 (13:06 +0200)
Summary:
We use the `major.minor.build` version format in this file, except when we try
to parse the result of the test binary.
In that regular expression, we expect the `major.minor.build.rev` format, which
is never fulfilled.

Reviewers: NoQ, george.karpenkov, alexandre.isoard, serge-sans-paille

Reviewed By: NoQ

Subscribers: mgorny, mikhail.ramalho, Charusso, martong, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76837

llvm/cmake/modules/FindZ3.cmake

index 0429427..95dd377 100644 (file)
@@ -27,7 +27,7 @@ function(check_z3_version z3_include z3_lib)
   )
 
   if(Z3_COMPILED)
-    string(REGEX REPLACE "([0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*)" "\\1"
+    string(REGEX REPLACE "([0-9]*\\.[0-9]*\\.[0-9]*)" "\\1"
            z3_version "${SRC_OUTPUT}")
     set(Z3_VERSION_STRING ${z3_version} PARENT_SCOPE)
   endif()