OSDN Git Service

2122665c0dc4bbbac7bd22669c7adf9f9012f7af
[android-x86/external-llvm.git] / projects / CMakeLists.txt
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)
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))
14       add_subdirectory(${entry})
15     endif()
16   endif()
17 endforeach(entry)
18
19 # Also add in libc++ and compiler-rt trees if present (and we have
20 # a sufficiently recent version of CMake where required).
21 if(${LLVM_BUILD_RUNTIME})
22   # MSVC isn't quite working with libc++ yet, disable it until issues are
23   # fixed.
24   if(NOT MSVC)
25     # Add the projects in reverse order of their dependencies so that the
26     # dependent projects can see the target names of their dependencies.
27     add_llvm_external_project(libunwind)
28     add_llvm_external_project(libcxxabi)
29     add_llvm_external_project(libcxx)
30   endif()
31   if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
32     add_llvm_external_project(compiler-rt)
33   endif()
34 endif()
35
36 add_llvm_external_project(dragonegg)
37 add_llvm_external_project(parallel-libs)