summaryrefslogtreecommitdiffstats
path: root/libunwind/cmake
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-06-20 20:53:19 +0000
committerMartin Storsjo <martin@martin.st>2018-06-20 20:53:19 +0000
commitfaf9589fae1c73e6495d4aa9d3299a18e12f145a (patch)
tree8728fde4b05f52de6726aa41a18825c94dea3089 /libunwind/cmake
parente5a42e977f13e75db8068b2e8ffeef25d040a4ca (diff)
downloadbcm5719-llvm-faf9589fae1c73e6495d4aa9d3299a18e12f145a.tar.gz
bcm5719-llvm-faf9589fae1c73e6495d4aa9d3299a18e12f145a.zip
[CMake] Convert paths to the right form in standalone builds on Windows
The paths output from llvm-config --cmakedir and from clang --print-libgcc-file-name can contain backslashes, while CMake can't handle the paths in this form. This matches what compiler-rt already does (since SVN r203789 and r293195). Differential Revision: https://reviews.llvm.org/D48353 llvm-svn: 335169
Diffstat (limited to 'libunwind/cmake')
-rw-r--r--libunwind/cmake/Modules/HandleCompilerRT.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/libunwind/cmake/Modules/HandleCompilerRT.cmake b/libunwind/cmake/Modules/HandleCompilerRT.cmake
index 9bf88bb4c27..275243a1bc6 100644
--- a/libunwind/cmake/Modules/HandleCompilerRT.cmake
+++ b/libunwind/cmake/Modules/HandleCompilerRT.cmake
@@ -14,6 +14,7 @@ function(find_compiler_rt_library name dest)
OUTPUT_VARIABLE LIBRARY_FILE
)
string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+ file(TO_CMAKE_PATH "${LIBRARY_FILE}" LIBRARY_FILE)
string(REPLACE "builtins" "${name}" LIBRARY_FILE "${LIBRARY_FILE}")
if (NOT HAD_ERROR AND EXISTS "${LIBRARY_FILE}")
message(STATUS "Found compiler-rt library: ${LIBRARY_FILE}")
@@ -37,6 +38,7 @@ function(find_compiler_rt_dir dest)
OUTPUT_VARIABLE LIBRARY_DIR
)
string(STRIP "${LIBRARY_DIR}" LIBRARY_DIR)
+ file(TO_CMAKE_PATH "${LIBRARY_DIR}" LIBRARY_DIR)
set(LIBRARY_DIR "${LIBRARY_DIR}/darwin")
else()
set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBUNWIND_COMPILE_FLAGS}
@@ -47,6 +49,7 @@ function(find_compiler_rt_dir dest)
OUTPUT_VARIABLE LIBRARY_FILE
)
string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+ file(TO_CMAKE_PATH "${LIBRARY_FILE}" LIBRARY_FILE)
get_filename_component(LIBRARY_DIR "${LIBRARY_FILE}" DIRECTORY)
endif()
if (NOT HAD_ERROR AND EXISTS "${LIBRARY_DIR}")
OpenPOWER on IntegriCloud