From 52eac768a17b34a3f136484a87042dd17ae7dc21 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 15 Sep 2016 06:14:13 +0000 Subject: [PATCH] [CMake] Fixing lit for runtimes directory Copy variable LLVM_BUILD_MAIN_SRC_DIR from LLVMConfig.cmake to LLVM_MAIN_SRC_DIR as it is named for in-tree builds. This ensures that add_lit_target() can reliably find llvm-lit which is not necessarily in the PATH. Differential Revision: https://reviews.llvm.org/D24503 llvm-svn: 281585 --- runtimes/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index e43ea74e00f..2974726a7f7 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -58,6 +58,9 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR}) set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR}) + # This variable makes sure that e.g. llvm-lit is found. + set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) + foreach(entry ${runtimes}) get_filename_component(projName ${entry} NAME)