diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index b1a47b55cfcd..bf802a3b4ea8 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -73,7 +73,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) # Setting a variable to let sub-projects detect which other projects # will be included under here. set(HAVE_${canon_name} On) + endforeach() + # We do this in two loops so that HAVE_* is set for each runtime before the + # other runtimes are added. + foreach(entry ${runtimes}) + get_filename_component(projName ${entry} NAME) + # Between each sub-project we want to cache and clear the LIT properties set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES) set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)