1# Discover the projects that use CMake in the subdirectories. 2# Note that explicit cmake invocation is required every time a new project is 3# added or removed. 4file(GLOB entries *) 5foreach(entry ${entries}) 6 if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt) 7 if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND 8 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND 9 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND 10 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi)) 11 add_subdirectory(${entry}) 12 endif() 13 endif() 14endforeach(entry) 15 16# Also add in libc++ and compiler-rt trees if present (and we have 17# a sufficiently recent version of CMake where required). 18if(${LLVM_BUILD_RUNTIME}) 19 # MSVC isn't quite working with libc++ yet, disable it until issues are 20 # fixed. 21 if(NOT MSVC) 22 add_llvm_external_project(libcxx) 23 add_llvm_external_project(libcxxabi) 24 endif() 25 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) 26 add_llvm_external_project(compiler-rt) 27 endif() 28endif() 29 30add_llvm_external_project(dragonegg) 31