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) AND 11 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND 12 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite)) 13 add_subdirectory(${entry}) 14 endif() 15 endif() 16endforeach(entry) 17 18# Also add in libc++ and compiler-rt trees if present (and we have 19# a sufficiently recent version of CMake where required). 20if(${LLVM_BUILD_RUNTIME}) 21 # MSVC isn't quite working with libc++ yet, disable it until issues are 22 # fixed. 23 if(NOT MSVC) 24 # libc++ uses the libc++abi target names so libc++abi should be added 25 # first. 26 add_llvm_external_project(libcxxabi) 27 add_llvm_external_project(libcxx) 28 add_llvm_external_project(libunwind) 29 endif() 30 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) 31 add_llvm_external_project(compiler-rt) 32 endif() 33endif() 34 35add_llvm_external_project(dragonegg) 36