aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcxx/CMakeLists.txt7
-rw-r--r--libcxx/benchmarks/CMakeLists.txt6
-rw-r--r--libcxx/modules/CMakeLists.txt1
-rw-r--r--libcxx/src/CMakeLists.txt2
-rw-r--r--libcxx/test/CMakeLists.txt14
-rw-r--r--libcxx/test/tools/clang_tidy_checks/CMakeLists.txt2
-rw-r--r--libcxxabi/CMakeLists.txt3
-rw-r--r--libcxxabi/src/CMakeLists.txt1
-rw-r--r--libcxxabi/test/CMakeLists.txt13
-rw-r--r--libunwind/test/CMakeLists.txt2
10 files changed, 15 insertions, 36 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index bbde9ab..a061fda 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -856,15 +856,14 @@ endfunction()
#===============================================================================
# Setup Source Code And Tests
#===============================================================================
+add_custom_target(cxx-test-depends
+ COMMENT "Build dependencies required to run the libc++ test suite.")
+
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(utils)
add_subdirectory(modules)
-set(LIBCXX_TEST_DEPS "cxx_experimental")
-
-list(APPEND LIBCXX_TEST_DEPS generate-cxx-modules)
-
if (LIBCXX_INCLUDE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt
index 93b549a..2101f9c 100644
--- a/libcxx/benchmarks/CMakeLists.txt
+++ b/libcxx/benchmarks/CMakeLists.txt
@@ -252,10 +252,6 @@ endforeach()
if (LIBCXX_INCLUDE_TESTS)
include(AddLLVM)
- if (NOT DEFINED LIBCXX_TEST_DEPS)
- message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined")
- endif()
-
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py)
@@ -265,6 +261,6 @@ if (LIBCXX_INCLUDE_TESTS)
add_lit_target(check-cxx-benchmarks
"Running libcxx benchmarks tests"
${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS cxx-benchmarks ${LIBCXX_TEST_DEPS}
+ DEPENDS cxx-benchmarks cxx-test-depends
ARGS ${BENCHMARK_LIT_ARGS})
endif()
diff --git a/libcxx/modules/CMakeLists.txt b/libcxx/modules/CMakeLists.txt
index d47d19a..82cd7b6 100644
--- a/libcxx/modules/CMakeLists.txt
+++ b/libcxx/modules/CMakeLists.txt
@@ -202,6 +202,7 @@ add_custom_target(generate-cxx-modules
ALL DEPENDS
${_all_modules}
)
+add_dependencies(cxx-test-depends generate-cxx-modules)
# Configure the modules manifest.
# Use the relative path between the installation and the module in the json
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 8b28d1b..65e6ce2 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -322,6 +322,7 @@ endif()
# Add a meta-target for both libraries.
add_custom_target(cxx DEPENDS ${LIBCXX_BUILD_TARGETS})
+add_dependencies(cxx-test-depends cxx)
set(LIBCXX_EXPERIMENTAL_SOURCES
experimental/keep.cpp
@@ -366,6 +367,7 @@ set_target_properties(cxx_experimental
)
cxx_add_common_build_flags(cxx_experimental)
target_compile_options(cxx_experimental PUBLIC -D_LIBCPP_ENABLE_EXPERIMENTAL)
+add_dependencies(cxx-test-depends cxx_experimental)
if (LIBCXX_INSTALL_SHARED_LIBRARY)
install(TARGETS cxx_shared
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index ee3502d..3c54a4e 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -1,11 +1,5 @@
include(HandleLitArguments)
add_subdirectory(tools)
-# When the tools add clang-tidy support, the dependencies need to be updated.
-# This cannot be done in the tools CMakeLists.txt since that does not update
-# the status in this (a parent) directory.
-if(TARGET cxx-tidy)
- list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
-endif()
# By default, libcxx and libcxxabi share a library directory.
if (NOT LIBCXX_CXX_ABI_LIBRARY_PATH)
@@ -40,10 +34,6 @@ endif()
serialize_lit_params_list(SERIALIZED_LIT_PARAMS LIBCXX_TEST_PARAMS)
-if (NOT DEFINED LIBCXX_TEST_DEPS)
- message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined")
-endif()
-
if (MSVC)
# Shared code for initializing some parameters used by all
# llvm-libc++-*-clangcl.cfg.in test configs.
@@ -81,10 +71,6 @@ if (LIBCXX_INCLUDE_TESTS)
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py")
- add_custom_target(cxx-test-depends
- DEPENDS cxx ${LIBCXX_TEST_DEPS}
- COMMENT "Builds dependencies required to run the test suite.")
-
add_lit_testsuite(check-cxx
"Running libcxx tests"
${CMAKE_CURRENT_BINARY_DIR}
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 28c1dbf..f0289dc 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -110,3 +110,5 @@ set_target_properties(cxx-tidy PROPERTIES
set_target_properties(cxx-tidy PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_SHARED_MODULE_SUFFIX_CXX .plugin) # Use a portable suffix to simplify how we can find it from Lit
+
+add_dependencies(cxx-test-depends cxx-tidy)
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index f7673da..86fe4a6 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -443,6 +443,9 @@ if (NOT "${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}" STREQUAL "")
include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
endif()
+add_custom_target(cxxabi-test-depends
+ COMMENT "Build dependencies required to run the libc++abi test suite.")
+
# Add source code. This also contains all of the logic for deciding linker flags
# soname, etc...
add_subdirectory(include)
diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index c8cc93d..c54ced4 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -304,6 +304,7 @@ endif()
# Add a meta-target for both libraries.
add_custom_target(cxxabi DEPENDS ${LIBCXXABI_BUILD_TARGETS})
+add_dependencies(cxxabi-test-depends cxxabi cxx)
if (LIBCXXABI_INSTALL_LIBRARY)
install(TARGETS ${LIBCXXABI_INSTALL_TARGETS}
diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt
index cd908a3..8e3048f2 100644
--- a/libcxxabi/test/CMakeLists.txt
+++ b/libcxxabi/test/CMakeLists.txt
@@ -10,17 +10,6 @@ endmacro()
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
-if (LIBCXXABI_ENABLE_SHARED)
- set(LIBCXXABI_TEST_DEPS cxxabi_shared)
-else()
- set(LIBCXXABI_TEST_DEPS cxxabi_static)
-endif()
-
-list(APPEND LIBCXXABI_TEST_DEPS cxx)
-if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
- list(APPEND LIBCXXABI_TEST_DEPS unwind)
-endif()
-
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")
set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick them up\n")
@@ -59,4 +48,4 @@ configure_lit_site_cfg(
add_lit_testsuite(check-cxxabi "Running libcxxabi tests"
${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${LIBCXXABI_TEST_DEPS})
+ DEPENDS cxxabi-test-depends)
diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt
index bd2e575..19f055f 100644
--- a/libunwind/test/CMakeLists.txt
+++ b/libunwind/test/CMakeLists.txt
@@ -47,4 +47,4 @@ configure_lit_site_cfg(
add_lit_testsuite(check-unwind "Running libunwind tests"
${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS unwind ${LIBUNWIND_TEST_DEPS})
+ DEPENDS unwind)