about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2020-02-04 00:08:12 +0100
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-02-24 10:16:36 +0000
commitf253fd3d2c070573ad86350c4b8495fb58766584 (patch)
treea5fbbfd87c809daddd27b509a8bb8ef9e8b1eaee
parentfda7031cfa592ba6cf11728ac8b9fc2e18843b03 (diff)
downloadklee-f253fd3d2c070573ad86350c4b8495fb58766584.tar.gz
find_llvm.cmake: enable parsing for git version
-rw-r--r--cmake/find_llvm.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
index 8527221a..76418824 100644
--- a/cmake/find_llvm.cmake
+++ b/cmake/find_llvm.cmake
@@ -72,7 +72,7 @@ else()
   # Get LLVM version
   _run_llvm_config(LLVM_PACKAGE_VERSION "--version")
   # Try x.y.z patern
-  set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(svn)?$")
+  set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(svn|git)?$")
   if ("${LLVM_PACKAGE_VERSION}" MATCHES "${_llvm_version_regex}")
     string(REGEX REPLACE
       "${_llvm_version_regex}"
@@ -91,7 +91,7 @@ else()
       "${LLVM_PACKAGE_VERSION}")
   else()
     # try x.y pattern
-    set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)(svn)?$")
+    set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)(svn|git)?$")
     if ("${LLVM_PACKAGE_VERSION}" MATCHES "${_llvm_version_regex}")
       string(REGEX REPLACE
         "${_llvm_version_regex}"