From 6a5bd7f0dacd96b66c294919fa5859ca12224d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Fri, 25 Apr 2014 18:24:56 +0200 Subject: Qt4: write moc parameter file only when content has changed --- Modules/Qt4Macros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index b1b12d6..8c4daac 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -135,7 +135,9 @@ function (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target set(targetincludes) set(targetdefines) else() - file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n") + set(CMAKE_CONFIGURABLE_FILE_CONTENT "${_moc_parameters}") + configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" + "${_moc_parameters_file}" @ONLY) endif() set(_moc_extra_parameters_file @${_moc_parameters_file}) -- cgit v0.12