[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

llvm-svn: 272275
This commit is contained in:
Chris Bieneman 2016-06-09 16:21:10 +00:00
parent 692d533100
commit ecdbb765fa
1 changed files with 2 additions and 0 deletions

View File

@ -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")