Qt4: write moc parameter file only when content has changed

This commit is contained in:
Peter Kümmel 2014-04-25 18:24:56 +02:00
parent 041dfea55b
commit 6a5bd7f0da
1 changed files with 3 additions and 1 deletions

View File

@ -135,7 +135,9 @@ function (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target
set(targetincludes) set(targetincludes)
set(targetdefines) set(targetdefines)
else() 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() endif()
set(_moc_extra_parameters_file @${_moc_parameters_file}) set(_moc_extra_parameters_file @${_moc_parameters_file})