summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt')
-rw-r--r--Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt b/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt
index a9ccece..a3ba9fb 100644
--- a/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt
+++ b/Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt
@@ -26,6 +26,7 @@ macro(rebuild buildName)
endmacro()
configure_file("${testProjectTemplateDir}/mocwidget.h" "${testProjectSrc}/mocwidget.h" COPYONLY)
+configure_file("${testProjectTemplateDir}/mainwindow.h" "${testProjectSrc}/mainwindow.h" COPYONLY)
configure_file("${testProjectTemplateDir}/main.cpp" "${testProjectSrc}/main.cpp" COPYONLY)
configure_file("${testProjectTemplateDir}/subdir/subdircheck.cpp" "${testProjectSrc}/subdir/subdircheck.cpp" COPYONLY)
configure_file("${testProjectTemplateDir}/CMakeLists.txt.in" "${testProjectSrc}/CMakeLists.txt" @ONLY)
@@ -103,3 +104,15 @@ execute_process(COMMAND "${testProjectBinDir}/${extra_bin_path}UicOnFileChange"
if(NOT result EQUAL "0")
message(FATAL_ERROR "Rebuild of UicOnFileChange test result is: ${result}")
endif()
+
+# Check if the generated ui_mainwindow.h rules introduce circular dependency between the generated
+# ui_mainwinow.h and timestamp.
+#
+# The first rebuild updates a timestamp dependency file after "touching" mainwindow.h.
+sleep()
+execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${testProjectSrc}/mainwindow.h")
+rebuild(3)
+
+# The second rebuild detects if cycling dependency is introduced by deps file.
+sleep()
+rebuild(4)