Skip to content

Commit

Permalink
cmake: find_llvm, handle libLLVM-version.so properly
Browse files Browse the repository at this point in the history
Some builds of llvm contain a lib like this:
/usr/lib64/libLLVM-3.9.so

Extend the regular expression, so that we really return what we are
supposed to.

Signed-off-by: Jiri Slaby <[email protected]>
  • Loading branch information
jirislaby authored and MartinNowack committed Jun 11, 2018
1 parent d4787aa commit c75e42a
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 @@ -173,7 +173,7 @@ else()
set(created_targets "")
foreach (llvm_lib ${_llvm_libs_list})
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}")
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}")
# DEBUG: message(STATUS "Creating imported target \"${target_name}\"" " for \"${llvm_lib}\"")
Expand Down

0 comments on commit c75e42a

Please sign in to comment.