summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2011-03-10 14:45:45 -0700
committerClinton Stimpson <clinton@elemtech.com>2011-03-10 14:45:45 -0700
commitae587e49a681732c949540274ea9dc9bc58cf9f6 (patch)
tree5949e684c7f7bce5da15c92a2ed9ba2bf82dc4f9
parent8def3f59495208b44ae2b94d177c9cccd5bb1cca (diff)
downloadcmake-ae587e49a681732c949540274ea9dc9bc58cf9f6.tar.gz
cmake-ae587e49a681732c949540274ea9dc9bc58cf9f6.tar.xz
cmake-ae587e49a681732c949540274ea9dc9bc58cf9f6.zip
Speed up creation of parameters file for moc custom command.
Thanks A. Saratow for patch.
-rw-r--r--Modules/Qt4Macros.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 86a74044e..6d7a3ec21 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}