diff options
author | Brad King <brad.king@kitware.com> | 2011-03-15 18:47:30 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-03-15 18:47:30 (GMT) |
commit | f8f6c5f8998654871684cf9478c4cb720cb220b7 (patch) | |
tree | 4a169b933460be6dcaf4b498efe85de5ebc741b7 /Modules | |
parent | b035e638c0948e99cd193d362dd6d125ecef3172 (diff) | |
parent | ae587e49a681732c949540274ea9dc9bc58cf9f6 (diff) | |
download | CMake-f8f6c5f8998654871684cf9478c4cb720cb220b7.zip CMake-f8f6c5f8998654871684cf9478c4cb720cb220b7.tar.gz CMake-f8f6c5f8998654871684cf9478c4cb720cb220b7.tar.bz2 |
Merge topic 'qt4-paramfile-speed'
ae587e4 Speed up creation of parameters file for moc custom command.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Qt4Macros.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 86a7404..6d7a3ec 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -107,10 +107,8 @@ MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) ENDIF(_moc_outfile_dir) SET (_moc_parameters_file ${outfile}_parameters) SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") - FILE (REMOVE ${_moc_parameters_file}) - FOREACH(arg ${_moc_parameters}) - FILE (APPEND ${_moc_parameters_file} "${arg}\n") - ENDFOREACH(arg) + STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") + FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}") ADD_CUSTOM_COMMAND(OUTPUT ${outfile} COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters DEPENDS ${infile} |