------------------------------------------------------------------------
r294954 | chapuni | 2017-02-13 06:59:53 -0800 (Mon, 13 Feb 2017) | 5 lines
Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.
CMake handles paths with slashes. It caused cmake/install failure on msbuild.exe.
Note, Other llvm-config-oriented variables have been normalized since they are stored in the cache attributed with PATH.
------------------------------------------------------------------------
------------------------------------------------------------------------
r295592 | chapuni | 2017-02-18 19:17:31 -0800 (Sat, 18 Feb 2017) | 1 line
clang/CMakeLists.txt: Rework r294954 -- use file(TO_CMAKE_PATH).
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295760
91177308-0d34-0410-b5e6-
96231b3b80d8
list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
- list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH)
+ list(GET CONFIG_OUTPUT 6 LLVM_CONFIG_CMAKE_PATH)
if(NOT MSVC_IDE)
set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
+ # Normalize LLVM_CMAKE_PATH. --cmakedir might contain backslashes.
+ # CMake assumes slashes as PATH.
+ file(TO_CMAKE_PATH ${LLVM_CONFIG_CMAKE_PATH} LLVM_CMAKE_PATH)
+
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)