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)