[PATCH] D86245: Fix an issue where get_system_libname creates an empty regex capture on windows
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 14:34:54 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1ed1e16ab83f: [CMake] Fix an issue where get_system_libname creates an empty regex capture on… (authored by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86245/new/
https://reviews.llvm.org/D86245
Files:
llvm/lib/Support/CMakeLists.txt
Index: llvm/lib/Support/CMakeLists.txt
===================================================================
--- llvm/lib/Support/CMakeLists.txt
+++ llvm/lib/Support/CMakeLists.txt
@@ -4,10 +4,14 @@
function(get_system_libname libpath libname)
get_filename_component(libpath ${libpath} NAME)
- string(REPLACE ";" "|" PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
- string(REPLACE ";" "|" SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
- STRING(REGEX REPLACE "^(${PREFIXES})" "" libpath ${libpath})
- STRING(REGEX REPLACE "(${SUFFIXES})$" "" libpath ${libpath})
+ if( CMAKE_FIND_LIBRARY_PREFIXES )
+ string(REPLACE ";" "|" PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
+ string(REGEX REPLACE "^(${PREFIXES})" "" libpath ${libpath})
+ endif()
+ if( CMAKE_FIND_LIBRARY_SUFFIXES )
+ string(REPLACE ";" "|" SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
+ string(REGEX REPLACE "(${SUFFIXES})$" "" libpath ${libpath})
+ endif()
set(${libname} "${libpath}" PARENT_SCOPE)
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86245.286667.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/a7d71351/attachment-0001.bin>
More information about the llvm-commits
mailing list