Skip to content

Commit

Permalink
CMake: Fixed the LLVM version regex
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adrianherrera authored and delcypher committed Dec 18, 2016
1 parent f997712 commit e056aa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/find_llvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit e056aa4

Please sign in to comment.