Oscar Fuentes | afbe975 | 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 | 276abc5 | 2012-06-27 00:30:08 +0000 | [diff] [blame] | 7 | if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND |
NAKAMURA Takumi | 480132f | 2014-01-24 12:53:08 +0000 | [diff] [blame] | 8 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND |
Chandler Carruth | da490d2 | 2014-07-25 10:27:40 +0000 | [diff] [blame] | 9 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND |
| 10 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi)) |
Daniel Dunbar | e0b374b | 2010-01-22 18:14:27 +0000 | [diff] [blame] | 11 | add_subdirectory(${entry}) |
| 12 | endif() |
Oscar Fuentes | afbe975 | 2009-03-06 01:16:52 +0000 | [diff] [blame] | 13 | endif() |
| 14 | endforeach(entry) |
Chandler Carruth | 0c94f5e | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 15 | |
Chandler Carruth | 408b4fa | 2013-09-28 18:17:10 +0000 | [diff] [blame] | 16 | # Also add in libc++ and compiler-rt trees if present (and we have |
| 17 | # a sufficiently recent version of CMake where required). |
Alexey Samsonov | db171ea | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 18 | if(${LLVM_BUILD_RUNTIME}) |
Chandler Carruth | 0218fb6 | 2013-10-02 06:25:57 +0000 | [diff] [blame] | 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) |
Chandler Carruth | da490d2 | 2014-07-25 10:27:40 +0000 | [diff] [blame] | 23 | add_llvm_external_project(libcxxabi) |
Chandler Carruth | 0218fb6 | 2013-10-02 06:25:57 +0000 | [diff] [blame] | 24 | endif() |
Alexey Samsonov | f431a83 | 2014-02-27 08:59:01 +0000 | [diff] [blame] | 25 | if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) |
| 26 | add_llvm_external_project(compiler-rt) |
| 27 | endif() |
Chandler Carruth | 0c94f5e | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 28 | endif() |
NAKAMURA Takumi | 480132f | 2014-01-24 12:53:08 +0000 | [diff] [blame] | 29 | |
| 30 | add_llvm_external_project(dragonegg) |