blob: e23a27705620b0206d22988a8ed01edd1c049002 [file] [log] [blame]
Oscar Fuentes5c6bf652009-03-06 01:16:52 +00001# 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)
Chandler Carrutheb2dea22012-06-27 00:30:08 +00007 if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND
Stephen Hines36b56882014-04-23 16:57:46 -07008 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND
Chandler Carrutheb2dea22012-06-27 00:30:08 +00009 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx))
Daniel Dunbar50a5aa12010-01-22 18:14:27 +000010 add_subdirectory(${entry})
11 endif()
Oscar Fuentes5c6bf652009-03-06 01:16:52 +000012 endif()
13endforeach(entry)
Chandler Carruthd9f3dd92012-08-29 00:38:02 +000014
Chandler Carruth2f101e82013-09-28 18:17:10 +000015# Also add in libc++ and compiler-rt trees if present (and we have
16# a sufficiently recent version of CMake where required).
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000017if(${LLVM_BUILD_RUNTIME})
Chandler Carruthfd1b7992013-10-02 06:25:57 +000018 # 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 Hines36b56882014-04-23 16:57:46 -070023 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000024 add_llvm_external_project(compiler-rt)
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000025 endif()
Chandler Carruthd9f3dd92012-08-29 00:38:02 +000026endif()
Stephen Hines36b56882014-04-23 16:57:46 -070027
28add_llvm_external_project(dragonegg)