diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-02-15 02:19:34 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2020-02-15 02:23:37 (GMT) |
commit | afc895676562cacf78e093b66f24064076748af2 (patch) | |
tree | 6e36b238266a00ad1bef820ac9435f2ea152990c | |
parent | 125f0451a9061c60036c5f92d104ee9fb3111a98 (diff) | |
download | CMake-afc895676562cacf78e093b66f24064076748af2.zip CMake-afc895676562cacf78e093b66f24064076748af2.tar.gz CMake-afc895676562cacf78e093b66f24064076748af2.tar.bz2 |
Tests: Fix test_clean target missing some test directories
-rw-r--r-- | Tests/CMakeLists.txt | 23 | ||||
-rw-r--r-- | Tests/Qt4Autogen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Qt5Autogen/CMakeLists.txt | 2 |
3 files changed, 16 insertions, 11 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 6fad175..33c7514 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3423,17 +3423,6 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH set_tests_properties ( KDELibsAlpha1 PROPERTIES TIMEOUT 5400) endif() - # If this is not an in-source build, provide a target to wipe out - # all the test build directories. - if(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") - configure_file(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in - ${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY) - add_custom_target(test_clean - COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake - COMMENT "Removing test build directories." - ) - endif() - # Define a set of "contract" tests, each activated by a cache entry # named "CMake_TEST_CONTRACT_<project>". For each Contract test, # the project should provide a directory with a CMakeLists.txt file @@ -3508,4 +3497,16 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeTests) endif() + + # If this is not an in-source build, provide a target to wipe out + # all the test build directories. This must come at the end after + # all the above logic has finished adding to TEST_BUILD_DIRS + if(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") + configure_file(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in + ${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY) + add_custom_target(test_clean + COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake + COMMENT "Removing test build directories." + ) + endif() endif() diff --git a/Tests/Qt4Autogen/CMakeLists.txt b/Tests/Qt4Autogen/CMakeLists.txt index 68b885b..e7f1ae3 100644 --- a/Tests/Qt4Autogen/CMakeLists.txt +++ b/Tests/Qt4Autogen/CMakeLists.txt @@ -7,3 +7,5 @@ ADD_AUTOGEN_TEST(DefinesTest) # Common tests include("../QtAutogen/Tests.cmake") + +set(TEST_BUILD_DIRS "${TEST_BUILD_DIRS}" PARENT_SCOPE) diff --git a/Tests/Qt5Autogen/CMakeLists.txt b/Tests/Qt5Autogen/CMakeLists.txt index 49d33cc..df4927a 100644 --- a/Tests/Qt5Autogen/CMakeLists.txt +++ b/Tests/Qt5Autogen/CMakeLists.txt @@ -4,3 +4,5 @@ include("../QtAutogen/TestMacros.cmake") # Common tests include("../QtAutogen/Tests.cmake") + +set(TEST_BUILD_DIRS "${TEST_BUILD_DIRS}" PARENT_SCOPE) |