Oscar Fuentes | 5c6bf65 | 2009-03-06 01:16:52 +0000 | [diff] [blame] | 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. |
| 4 | file(GLOB entries *) |
| 5 | foreach(entry ${entries}) |
| 6 | if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt) |
Chandler Carruth | eb2dea2 | 2012-06-27 00:30:08 +0000 | [diff] [blame] | 7 | if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame^] | 8 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND |
Chandler Carruth | eb2dea2 | 2012-06-27 00:30:08 +0000 | [diff] [blame] | 9 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx)) |
Daniel Dunbar | 50a5aa1 | 2010-01-22 18:14:27 +0000 | [diff] [blame] | 10 | add_subdirectory(${entry}) |
| 11 | endif() |
Oscar Fuentes | 5c6bf65 | 2009-03-06 01:16:52 +0000 | [diff] [blame] | 12 | endif() |
| 13 | endforeach(entry) |
Chandler Carruth | d9f3dd9 | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 14 | |
Chandler Carruth | 2f101e8 | 2013-09-28 18:17:10 +0000 | [diff] [blame] | 15 | # Also add in libc++ and compiler-rt trees if present (and we have |
| 16 | # a sufficiently recent version of CMake where required). |
Alexey Samsonov | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 17 | if(${LLVM_BUILD_RUNTIME}) |
Chandler Carruth | fd1b799 | 2013-10-02 06:25:57 +0000 | [diff] [blame] | 18 | # MSVC isn't quite working with libc++ yet, disable it until issues are |
| 19 | # fixed. |
| 20 | if(NOT MSVC) |
| 21 | add_llvm_external_project(libcxx) |
| 22 | endif() |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame^] | 23 | if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) |
Alexey Samsonov | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 24 | add_llvm_external_project(compiler-rt) |
Alexey Samsonov | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 25 | endif() |
Chandler Carruth | d9f3dd9 | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 26 | endif() |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame^] | 27 | |
| 28 | add_llvm_external_project(dragonegg) |