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 |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 9 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND |
| 10 | (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi)) |
Daniel Dunbar | 50a5aa1 | 2010-01-22 18:14:27 +0000 | [diff] [blame] | 11 | add_subdirectory(${entry}) |
| 12 | endif() |
Oscar Fuentes | 5c6bf65 | 2009-03-06 01:16:52 +0000 | [diff] [blame] | 13 | endif() |
| 14 | endforeach(entry) |
Chandler Carruth | d9f3dd9 | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 15 | |
Chandler Carruth | 2f101e8 | 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 | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 18 | if(${LLVM_BUILD_RUNTIME}) |
Chandler Carruth | fd1b799 | 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) |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 23 | add_llvm_external_project(libcxxabi) |
Chandler Carruth | fd1b799 | 2013-10-02 06:25:57 +0000 | [diff] [blame] | 24 | endif() |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 25 | if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) |
Alexey Samsonov | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 26 | add_llvm_external_project(compiler-rt) |
Alexey Samsonov | 5c4e836 | 2013-03-05 14:43:07 +0000 | [diff] [blame] | 27 | endif() |
Chandler Carruth | d9f3dd9 | 2012-08-29 00:38:02 +0000 | [diff] [blame] | 28 | endif() |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 29 | |
| 30 | add_llvm_external_project(dragonegg) |