[lld] 662a58f - [lld] Convert LLVM_CMAKE_PATH to a CMake path
Isuru Fernando via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 13:43:01 PDT 2021
Author: Isuru Fernando
Date: 2021-05-05T15:42:55-05:00
New Revision: 662a58fa0534508c2c37b22425bfdf16b9d985a8
URL: https://github.com/llvm/llvm-project/commit/662a58fa0534508c2c37b22425bfdf16b9d985a8
DIFF: https://github.com/llvm/llvm-project/commit/662a58fa0534508c2c37b22425bfdf16b9d985a8.diff
LOG: [lld] Convert LLVM_CMAKE_PATH to a CMake path
Otherwise I get the following error on windows.
```
CMake Error at D:/bld/lld_1569206597988/work/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (set):
Syntax error in cmake code at
D:/bld/lld_1569206597988/work/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2
when parsing string
D:\bld\lld_1569206597988\_h_env\Library\lib\cmake\llvm
Invalid character escape '\b'.
CMake Error at D:/bld/lld_1569206597988/_build_env/Library/share/cmake-3.15/Modules/CheckSymbolExists.cmake:100 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
D:/bld/lld_1569206597988/_build_env/Library/share/cmake-3.15/Modules/CheckSymbolExists.cmake:57 (__CHECK_SYMBOL_EXISTS_IMPL)
D:/bld/lld_1569206597988/_h_env/Library/lib/cmake/llvm/HandleLLVMOptions.cmake:943 (check_symbol_exists)
CMakeLists.txt:56 (include)
```
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D68158
Added:
Modified:
lld/CMakeLists.txt
Removed:
################################################################################
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 53e09f938888..48c7081dae37 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -35,6 +35,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
file(TO_CMAKE_PATH ${LLVM_OBJ_ROOT} LLVM_BINARY_DIR)
+ file(TO_CMAKE_PATH ${LLVM_CMAKE_PATH} LLVM_CMAKE_PATH)
if(NOT EXISTS "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
message(FATAL_ERROR "LLVMConfig.cmake not found")
More information about the llvm-commits
mailing list