Commit cc3bc9c7 authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r294954 and r295592:

------------------------------------------------------------------------
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
parent ab74e4bf
......@@ -42,7 +42,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
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}
......@@ -57,6 +57,10 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment