From 1c2ac0b8baebcf2496d701ab316f8f5666b470be Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Tue, 17 Jan 2017 07:57:09 -0700 Subject: Qt4: Only change timestamp on generated .pro files if content changes In qt4_create_translation() use file(GENERATE ...) instead of file(WRITE ...). This also removes a possible CMP0058 warning because file(GENERATE) tells the Ninja generator about the files it provides. Fixes: #16518 --- Modules/Qt4Macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 0279d1c..0478918 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -439,7 +439,7 @@ macro(QT4_CREATE_TRANSLATION _qm_files) get_filename_component(_abs_include "${_pro_include}" ABSOLUTE) string(APPEND _pro_includes " \\\n \"${_abs_include}\"") endforeach() - file(WRITE ${_ts_pro} "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n") + file(GENERATE OUTPUT ${_ts_pro} CONTENT "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n") endif() add_custom_command(OUTPUT ${_ts_file} COMMAND Qt4::lupdate -- cgit v0.12