summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-17 15:39:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-17 15:39:46 (GMT)
commit0557e0b866cd07adfa4ddb80dd2fd0d3de10d45b (patch)
tree4334df4ca6a99a93dba7a6c872ef1aee96444a96 /Tests/CMakeLists.txt
parentb782fc9390a82dc23de12b5cefbf9aa3af489365 (diff)
parentef3194a6f821da30c461363530b8a7059dd85a58 (diff)
downloadCMake-0557e0b866cd07adfa4ddb80dd2fd0d3de10d45b.zip
CMake-0557e0b866cd07adfa4ddb80dd2fd0d3de10d45b.tar.gz
CMake-0557e0b866cd07adfa4ddb80dd2fd0d3de10d45b.tar.bz2
Merge topic 'git-config-with-spaces'
ef3194a6f8 ExternalProject: Quote each git --config option to handle spaces 40d1d29cfa Tests: Add missing ExternalProject smoke tests afc8956765 Tests: Fix test_clean target missing some test directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4364
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt23
1 files changed, 12 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()