From: Chris Bieneman Date: Thu, 9 Jun 2016 16:21:10 +0000 (+0000) Subject: [CMake] Fix an issue building out-of-tree introduced in r272200 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e88ae9a687ab635bf1a338e2b771e1e91d90a55b;p=clang [CMake] Fix an issue building out-of-tree introduced in r272200 The out-of-tree build needs to read LLVM_TOOLS_INSTALL_DIR out of TOOLS_BINARY_DIR because LLVM_TOOLS_INSTALL_DIR is used by AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272275 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fce8229550..ae95500863 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) + get_filename_component(LLVM_TOOLS_INSTALL_DIR ${TOOLS_BINARY_DIR} NAME) + if(NOT MSVC_IDE) set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} CACHE BOOL "Enable assertions")