about summary refs log tree commit diff homepage
path: root/cmake
diff options
context:
space:
mode:
authorAdrian Herrera <adrian.herrera02@gmail.com>2016-12-18 14:23:35 +0100
committerDan Liew <delcypher@gmail.com>2016-12-18 15:00:11 +0000
commite056aa4e0bd25a021f5385904bf6507ac8ca5e21 (patch)
treeed1acc12743ec44d660864c19720c483584116eb /cmake
parentf997712d5ccac6714e57d87626e37bb762491784 (diff)
downloadklee-e056aa4e0bd25a021f5385904bf6507ac8ca5e21.tar.gz
CMake: Fixed the LLVM version regex
When trying to KLEE with a version of LLVM (specifically, 3.5) built from
Github (https://github.com/llvm-mirror/llvm/tree/release_35) the regex in
find_llvm.cmake failed to match the LLVM version string because it was suffixed
with "svn" - i.e. "3.5.2svn".

Added the optional "svn" suffix to the CMake regex to fix this.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/find_llvm.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
index df730e12..53b2b392 100644
--- a/cmake/find_llvm.cmake
+++ b/cmake/find_llvm.cmake
@@ -65,7 +65,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]+)$")
+  set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(svn)?$")
   if ("${LLVM_PACKAGE_VERSION}" MATCHES "${_llvm_version_regex}")
     string(REGEX REPLACE
       "${_llvm_version_regex}"