summaryrefslogtreecommitdiff
path: root/runtimes/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2017-01-02 20:33:33 +0000
committerChris Bieneman <beanz@apple.com>2017-01-02 20:33:33 +0000
commit677ee432253472e0dacf989526a555d19956916a (patch)
tree1a2535ac60c1414599728f5a9a413fe034841d1f /runtimes/CMakeLists.txt
parent059fad8157292516a4d114e545c96a19b23b9603 (diff)
[CMake] Set HAVE_${runtime} before including any subdirectories
This should allow us to avoid most order dependence in the runtime library configurations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtimes/CMakeLists.txt')
-rw-r--r--runtimes/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index b1a47b55cfc..bf802a3b4ea 100644
--- a/runtimes/CMakeLists.txt
+++ b/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)