summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2017-01-17 14:57:09 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-20 18:28:48 (GMT)
commit1c2ac0b8baebcf2496d701ab316f8f5666b470be (patch)
treeb7e737614093f6fd90a5701ca04c10ec18f3a128 /Modules/Qt4Macros.cmake
parent35ad12f99e71515f9cc65b1219160b88095a5f6b (diff)
downloadCMake-1c2ac0b8baebcf2496d701ab316f8f5666b470be.zip
CMake-1c2ac0b8baebcf2496d701ab316f8f5666b470be.tar.gz
CMake-1c2ac0b8baebcf2496d701ab316f8f5666b470be.tar.bz2
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
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r--Modules/Qt4Macros.cmake2
1 files changed, 1 insertions, 1 deletions
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