brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · f5f7c98 Raw
52 lines · plain
1# Discover the projects that use CMake in the subdirectories.2# Note that explicit cmake invocation is required every time a new project is3# added or removed.4file(GLOB entries *)5foreach(entry ${entries})6  if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)7    if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND8       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND9       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND10       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND11       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND12       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/orc-rt) AND13       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND14       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp) AND15       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/cross-project-tests) AND16       (NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/flang-rt))17      get_filename_component(entry_name "${entry}" NAME)18      add_llvm_external_project(${entry_name})19    endif()20  endif()21endforeach(entry)22 23# Also add in libc++ and compiler-rt trees if present (and we have24# a sufficiently recent version of CMake where required).25if(${LLVM_BUILD_RUNTIME})26  # MSVC isn't quite working with libc++ yet, disable it until issues are27  # fixed.28  # FIXME: LLVM_FORCE_BUILD_RUNTIME is currently used by libc++ to force29  # enable the in-tree build when targeting clang-cl.30  if(NOT MSVC OR LLVM_FORCE_BUILD_RUNTIME)31    # Add the projects in reverse order of their dependencies so that the32    # dependent projects can see the target names of their dependencies.33    add_llvm_external_project(libunwind)34    add_llvm_external_project(pstl)35    add_llvm_external_project(libc)36    add_llvm_external_project(libcxxabi)37    add_llvm_external_project(libcxx)38    add_llvm_external_project(orc-rt)39  endif()40  if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)41    add_llvm_external_project(compiler-rt)42  endif()43  add_llvm_external_project(flang-rt)44endif()45 46add_llvm_external_project(dragonegg)47add_llvm_external_project(openmp)48 49if(LLVM_INCLUDE_TESTS)50  add_llvm_external_project(cross-project-tests)51endif()52