blob: 8d244fd49edd555c1417d488de98fd5b670b5e7c [file] [log] [blame]
Oscar Fuentesafbe9752009-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 Carruth276abc52012-06-27 00:30:08 +00007 if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND
NAKAMURA Takumi480132f2014-01-24 12:53:08 +00008 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND
Chandler Carruthda490d22014-07-25 10:27:40 +00009 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND
10 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi))
Daniel Dunbare0b374b2010-01-22 18:14:27 +000011 add_subdirectory(${entry})
12 endif()
Oscar Fuentesafbe9752009-03-06 01:16:52 +000013 endif()
14endforeach(entry)
Chandler Carruth0c94f5e2012-08-29 00:38:02 +000015
Chandler Carruth408b4fa2013-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 Samsonovdb171ea2013-03-05 14:43:07 +000018if(${LLVM_BUILD_RUNTIME})
Chandler Carruth0218fb62013-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)
Chandler Carruthda490d22014-07-25 10:27:40 +000023 add_llvm_external_project(libcxxabi)
Chandler Carruth0218fb62013-10-02 06:25:57 +000024 endif()
Alexey Samsonovf431a832014-02-27 08:59:01 +000025 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
26 add_llvm_external_project(compiler-rt)
27 endif()
Chandler Carruth0c94f5e2012-08-29 00:38:02 +000028endif()
NAKAMURA Takumi480132f2014-01-24 12:53:08 +000029
30add_llvm_external_project(dragonegg)