Description:
Re-run cmake may occur even though nothing is modified.
How to repeat:
In build in-source mode
1. make to create packaging/deb-in/CMakeFiles/progress.marks
2. cmake with packaging/deb-in/CMakeFiles/progress.marks existing
3. Then re-run cmake occurs in every make later even though nothing is modified.
Suggested fix:
analysis:
Based on packaging/deb-in/CMakeLists.txt, all file in packaging/deb-in except copyright and CMakeLists.txt will become the dependency of Makefile during cmake. However, packaging/deb-in/CMakeFiles/progress.mark is touched after Makefile is generated. So in every make later, "Re-run cmake file: Makefile older than: packaging/deb-in/CMakeFiles/progress.marks"
fix:
diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt
index 45bc455de8c..0a5eb70c1d5 100644
--- a/packaging/deb-in/CMakeLists.txt
+++ b/packaging/deb-in/CMakeLists.txt
@@ -277,6 +277,7 @@ FILE(GLOB_RECURSE SOURCEFILES RELATIVE "${DEB_ROOT}" "${DEB_ROOT}/*")
# Skip the copyright file from the "other" product type
LIST(REMOVE_ITEM SOURCEFILES "copyright.${DEB_REMOVEPATTERN}")
LIST(REMOVE_ITEM SOURCEFILES "CMakeLists.txt")
+LIST(REMOVE_ITEM SOURCEFILES "CMakeFiles/progress.marks")
# Don't install systemd file on systems without systemd
IF(DEB_INSTALL_SERVER_SYSTEMD STREQUAL "")
LIST(REMOVE_ITEM SOURCEFILES "mysql-packagesource-server.mysql.service.in")