From e7ba91fa8789cd8a03320b3740112a08f2e46866 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 1 Sep 2016 18:26:01 +0000 Subject: [PATCH] [CMake] Connecting check-all and test-depends targets correctly My previous attempt at this connected the sub-project check targets to the test-depends target instead of to the check-all target. That resulted in the tests running multiple times on bots that built "test-depends" and "check-all" in separate build invocations. llvm-svn: 280392 --- CMakeLists.txt | 9 +++++++-- runtimes/CMakeLists.txt | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5d47aaa520..83f44b8a878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -822,17 +822,22 @@ if( LLVM_INCLUDE_TESTS ) get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS) get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS) get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS) + get_property(LLVM_ADDITIONAL_TEST_TARGETS + GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_TARGETS) + get_property(LLVM_ADDITIONAL_TEST_DEPENDS + GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS) add_lit_target(check-all "Running all regression tests" ${LLVM_LIT_TESTSUITES} PARAMS ${LLVM_LIT_PARAMS} - DEPENDS ${LLVM_LIT_DEPENDS} + DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_TARGETS} ARGS ${LLVM_LIT_EXTRA_ARGS} ) if(TARGET check-runtimes) add_dependencies(check-all check-runtimes) endif() - add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS}) + add_custom_target(test-depends + DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_DEPENDS}) set_target_properties(test-depends PROPERTIES FOLDER "Tests") endif() diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 0ffffd6fbfe..e43ea74e00f 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -194,7 +194,8 @@ else() # if this is included from LLVM's CMake ${SUB_INSTALL_TARGETS} USE_TOOLCHAIN) if(LLVM_INCLUDE_TESTS) - set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS runtimes-test-depends) + set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends) + set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes) endif() endif() endif()