Skip to content

Commit 677ee43

Browse files
author
Chris Bieneman
committed
[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
1 parent 059fad8 commit 677ee43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtimes/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
7373
# Setting a variable to let sub-projects detect which other projects
7474
# will be included under here.
7575
set(HAVE_${canon_name} On)
76+
endforeach()
7677

78+
# We do this in two loops so that HAVE_* is set for each runtime before the
79+
# other runtimes are added.
80+
foreach(entry ${runtimes})
81+
get_filename_component(projName ${entry} NAME)
82+
7783
# Between each sub-project we want to cache and clear the LIT properties
7884
set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
7985
set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)

0 commit comments

Comments
 (0)