[CMake] Set HAVE_${runtime} before including any subdirectories

This should allow us to avoid most order dependence in the runtime library configurations.

llvm-svn: 290834
This commit is contained in:
Chris Bieneman 2017-01-02 20:33:33 +00:00
parent 2940231ff0
commit e205d766f0

View File

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