From f20d52a3b4bef1de7b9b15b793918d9437ba27b4 Mon Sep 17 00:00:00 2001 From: Alastair Reid Date: Tue, 16 Jun 2020 14:14:36 +0000 Subject: Tweak LLVM version string parser: support rust This change allows KLEE to be configured to use the LLVM version that comes with the Rust compiler instead of a standard version. e.g., one might configure with -DLLVM_CONFIG_BINARY=${RUST_SRC}/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-config For which typical output might be 10.0.1-rust-dev --- cmake/find_llvm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake index 76418824..c3acf112 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|git)?$") + set(_llvm_version_regex "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(svn|git|-rust-dev)?$") if ("${LLVM_PACKAGE_VERSION}" MATCHES "${_llvm_version_regex}") string(REGEX REPLACE "${_llvm_version_regex}" -- cgit 1.4.1