diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2018-05-25 15:17:03 +0200 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-09-14 09:59:29 +0100 |
commit | 44349e35e76ea3bb0429e61f0ddca2df1a979280 (patch) | |
tree | 7bca3c8661f8df37e9ad87bf77ba8d179a3e7e81 /cmake | |
parent | c27f225e79b82d3de4f70578cb80d0603fbff6f1 (diff) | |
download | klee-44349e35e76ea3bb0429e61f0ddca2df1a979280.tar.gz |
cmake: find_llvm, fix libraries with llvm-config 3.9
llvm-config from llvm 3.9 was broken. Fix handling of improperly returned libraries. From: liblibLLVM-3.9.so.so To: libLLVM-3.9.so Fixes #895. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/find_llvm.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake index adf68c4f..8ceed19f 100644 --- a/cmake/find_llvm.cmake +++ b/cmake/find_llvm.cmake @@ -172,7 +172,11 @@ else() set(targets_to_return "") set(created_targets "") foreach (llvm_lib ${_llvm_libs_list}) + # a bug in llvm-config from LLVM 3.9 + string(REGEX REPLACE "lib(libLLVM[-.a-zA-Z0-9]+\\.so)\\.so$" "\\1" llvm_lib "${llvm_lib}") + get_filename_component(llvm_lib_file_name "${llvm_lib}" NAME) + string(REGEX REPLACE "^(lib)?(LLVM[-.a-zA-Z0-9]+)\\..+$" "\\2" target_name "${llvm_lib_file_name}") list(APPEND targets_to_return "${target_name}") if (NOT TARGET "${target_name}") |