summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-18 14:04:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-18 14:04:47 (GMT)
commitd2489f2fde0adad51272b83e44957860f7b4c57f (patch)
treeec094f5ac703e62aadbf0796ff65c4d6af27fcc6 /Tests
parentf1235fd37d101d021ffa2dde1c67f0ea1cf1cc87 (diff)
parent91344e7a46a9c6a2d20781d889673143bd74d15a (diff)
downloadCMake-d2489f2fde0adad51272b83e44957860f7b4c57f.zip
CMake-d2489f2fde0adad51272b83e44957860f7b4c57f.tar.gz
CMake-d2489f2fde0adad51272b83e44957860f7b4c57f.tar.bz2
Merge topic 'autogen_test_fix'
91344e7a46 Autogen: Fix RerunMocPlugin test for Ninja generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2971
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt15
1 files changed, 4 insertions, 11 deletions
diff --git a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt
index 6ab9538..e1951f1 100644
--- a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt
+++ b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt
@@ -80,17 +80,10 @@ find_library(plEFile "PlugE" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" N
# To avoid a race condition where the library has the same timestamp
# as a source file and therefore gets rebuild
# - sleep to ensure a timestamp change
-# - touch library to ensure it has a new timestamp
-acquire_timestamps(Before)
+# - rebuild library to ensure it has a new timestamp
sleep()
-message(STATUS "Touching library files to ensure new timestamps")
-file(TOUCH_NOCREATE "${plAFile}" "${plBFile}" "${plCFile}" "${plDFile}" "${plEFile}")
-acquire_timestamps(After)
-require_change(A)
-require_change(B)
-require_change(C)
-require_change(D)
-require_change(E)
+message(STATUS "Rebuilding library files to ensure new timestamps")
+rebuild(1)
# - Ensure that the timestamp will change.
@@ -98,7 +91,7 @@ require_change(E)
# - Rebuild
acquire_timestamps(Before)
sleep()
-message(STATUS "Changing json files")
+message(STATUS "Changing json files.")
configure_file("${mocPlugSrcDir}/jsonIn/StyleD.json" "${mocPlugBinDir}/jsonFiles/StyleC.json")
configure_file("${mocPlugSrcDir}/jsonIn/StyleE.json" "${mocPlugBinDir}/jsonFiles/sub/StyleD.json")
configure_file("${mocPlugSrcDir}/jsonIn/StyleC.json" "${mocPlugBinDir}/jsonFiles/StyleE.json")