[llvm-objcopy] [COFF] Fix a test matching pathnames for Windows. NFC.
[llvm-core.git] / projects / CMakeLists.txt
blobc98a8824773384a4b289e702131e2bcb0a8abe84
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) AND
14        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp) AND
15        (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests))
16       get_filename_component(entry_name "${entry}" NAME)
17       add_llvm_external_project(${entry_name})
18     endif()
19   endif()
20 endforeach(entry)
22 # Also add in libc++ and compiler-rt trees if present (and we have
23 # a sufficiently recent version of CMake where required).
24 if(${LLVM_BUILD_RUNTIME})
25   # MSVC isn't quite working with libc++ yet, disable it until issues are
26   # fixed.
27   # FIXME: LLVM_FORCE_BUILD_RUNTIME is currently used by libc++ to force
28   # enable the in-tree build when targeting clang-cl.
29   if(NOT MSVC OR LLVM_FORCE_BUILD_RUNTIME)
30     # Add the projects in reverse order of their dependencies so that the
31     # dependent projects can see the target names of their dependencies.
32     add_llvm_external_project(libunwind)
33     add_llvm_external_project(libcxxabi)
34     add_llvm_external_project(pstl)
35     add_llvm_external_project(libcxx)
36   endif()
37   if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
38     add_llvm_external_project(compiler-rt)
39   endif()
40 endif()
42 add_llvm_external_project(dragonegg)
43 add_llvm_external_project(parallel-libs)
44 add_llvm_external_project(openmp)
46 if(LLVM_INCLUDE_TESTS)
47   add_llvm_external_project(debuginfo-tests)
48 endif()