[CMake] Add variables for tracking which runtimes are included
authorChris Bieneman <beanz@apple.com>
Thu, 18 Aug 2016 22:18:11 +0000 (22:18 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 18 Aug 2016 22:18:11 +0000 (22:18 +0000)
This allows sub-projects to have conditionals based on the presence of other projects.

llvm-svn: 279172

llvm/runtimes/CMakeLists.txt

index 3f9febc..bbdebff 100644 (file)
@@ -48,6 +48,10 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
     # The subdirectories need to treat this as standalone builds
     set(${canon_name}_STANDALONE_BUILD On)
 
+    # Setting a variable to let sub-projects detect which other projects
+    # will be included under here.
+    set(HAVE_${canon_name} On)
+
     add_subdirectory(${projName})
   endforeach()