diff options
author | Oleg Ranevskyy <oranevskyy@accesssoftek.com> | 2017-01-26 18:16:02 +0000 |
---|---|---|
committer | Oleg Ranevskyy <oranevskyy@accesssoftek.com> | 2017-01-26 18:16:02 +0000 |
commit | 07eeff5582edc11a4acbc516b18778f016c04723 (patch) | |
tree | 31295c41d30a976e267c9e74b4f34ad99678dfac /cmake/Modules/CompilerRTUtils.cmake | |
parent | e4e939eb25c504a61bfe1ad3c5db1f53fd080741 (diff) |
[Compiler-rt] Broken compiler-rt CMake configuring on Windows
Summary:
Hi Michal,
Would you be able to review this simple fix, please?
Since r291504 compiler-rt uses `llvm-config --cmakedir` to get the path to the LLVM CMake modules.
On Windows this option returns Windows style path with backslashes. CMake treats backslashes as beginning of an escaped character and thus fails to append the path to `CMAKE_MODULE_PATH`.
Reviewers: compnerd, mgorny
Reviewed By: mgorny
Subscribers: compnerd, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D28908
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTUtils.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index c337523cd..ed946d88f 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -225,7 +225,8 @@ macro(load_llvm_config) RESULT_VARIABLE HAD_ERROR OUTPUT_VARIABLE CONFIG_OUTPUT) if(NOT HAD_ERROR) - string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH) + string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH_FROM_LLVM_CONFIG) + file(TO_CMAKE_PATH ${LLVM_CMAKE_PATH_FROM_LLVM_CONFIG} LLVM_CMAKE_PATH) else() file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") |