1 # Discover the projects that use CMake in the subdirectories.
2 # Note that explicit cmake invocation is required every time a new project is
5 foreach(entry ${entries})
6 if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
7 if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND
8 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND
9 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND
10 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND
11 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND
12 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND
13 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/parallel-libs) AND
14 (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp))
15 add_subdirectory(${entry})
20 # Also add in libc++ and compiler-rt trees if present (and we have
21 # a sufficiently recent version of CMake where required).
22 if(${LLVM_BUILD_RUNTIME})
23 # MSVC isn't quite working with libc++ yet, disable it until issues are
25 # FIXME: LLVM_FORCE_BUILD_RUNTIME is currently used by libc++ to force
26 # enable the in-tree build when targeting clang-cl.
27 if(NOT MSVC OR LLVM_FORCE_BUILD_RUNTIME)
28 # Add the projects in reverse order of their dependencies so that the
29 # dependent projects can see the target names of their dependencies.
30 add_llvm_external_project(libunwind)
31 add_llvm_external_project(libcxxabi)
32 add_llvm_external_project(libcxx)
34 if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
35 add_llvm_external_project(compiler-rt)
39 add_llvm_external_project(dragonegg)
40 add_llvm_external_project(parallel-libs)
41 add_llvm_external_project(openmp)