[llvm] r290834 - [CMake] Set HAVE_${runtime} before including any subdirectories
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 12:33:34 PST 2017
Author: cbieneman
Date: Mon Jan 2 14:33:33 2017
New Revision: 290834
URL: http://llvm.org/viewvc/llvm-project?rev=290834&view=rev
Log:
[CMake] Set HAVE_${runtime} before including any subdirectories
This should allow us to avoid most order dependence in the runtime library configurations.
Modified:
llvm/trunk/runtimes/CMakeLists.txt
Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=290834&r1=290833&r2=290834&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Mon Jan 2 14:33:33 2017
@@ -73,7 +73,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
# 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)
More information about the llvm-commits
mailing list