blob: 8d244fd49edd555c1417d488de98fd5b670b5e7c [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
Stephen Hines37ed9c12014-12-01 14:51:49 -08009 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND
10 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi))
Daniel Dunbar50a5aa12010-01-22 18:14:27 +000011 add_subdirectory(${entry})
12 endif()
Oscar Fuentes5c6bf652009-03-06 01:16:52 +000013 endif()
14endforeach(entry)
Chandler Carruthd9f3dd92012-08-29 00:38:02 +000015
Chandler Carruth2f101e82013-09-28 18:17:10 +000016# Also add in libc++ and compiler-rt trees if present (and we have
17# a sufficiently recent version of CMake where required).
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000018if(${LLVM_BUILD_RUNTIME})
Chandler Carruthfd1b7992013-10-02 06:25:57 +000019 # 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 Hines37ed9c12014-12-01 14:51:49 -080023 add_llvm_external_project(libcxxabi)
Chandler Carruthfd1b7992013-10-02 06:25:57 +000024 endif()
Stephen Hines36b56882014-04-23 16:57:46 -070025 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000026 add_llvm_external_project(compiler-rt)
Alexey Samsonov5c4e8362013-03-05 14:43:07 +000027 endif()
Chandler Carruthd9f3dd92012-08-29 00:38:02 +000028endif()
Stephen Hines36b56882014-04-23 16:57:46 -070029
30add_llvm_external_project(dragonegg)