aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-23 19:02:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-23 19:02:12 +0000
commit1b6fff624e24727940c1fe59431e74ef11eda230 (patch)
treef2276a59448bc627bc84546660602d31cfa0793e /CMakeLists.txt
parenteb2854521a26d3f186018f1b119761ca7bb90dc2 (diff)
downloadsrc-1b6fff624e24727940c1fe59431e74ef11eda230.tar.gz
src-1b6fff624e24727940c1fe59431e74ef11eda230.zip
Vendor import of clang release_40 branch r295910:vendor/clang/clang-release_40-r295910
Notes
Notes: svn path=/vendor/clang/dist/; revision=314161 svn path=/vendor/clang/clang-release_40-r295910/; revision=314162; tag=vendor/clang/clang-release_40-r295910
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c56707e7fb57..ff1ff210b56d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)