diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2014-04-03 15:27:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-03 16:58:58 (GMT) |
commit | 7beba98652212c7a44f291b51dd03681e5193c49 (patch) | |
tree | 30dc0856afbb2a1bafad57e136a9056f114c99c2 /Modules/Qt4Macros.cmake | |
parent | a48de7d8506325e7f27c9dada578744e1ff3fb35 (diff) | |
download | CMake-7beba98652212c7a44f291b51dd03681e5193c49.zip CMake-7beba98652212c7a44f291b51dd03681e5193c49.tar.gz CMake-7beba98652212c7a44f291b51dd03681e5193c49.tar.bz2 |
Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
QT4_CREATE_MOC_COMMAND is given a moc_flags argument that contains the
COMPILE_DEFINITIONS and a potentially large list of include directories.
Since it is a macro, the ${moc_flags} reference is replaced with this
content and sent through cmMakefile::ExpandVariablesInString (EVIS).
Since commit v3.0.0-rc1~138^2 (Qt4: Use generator expression in
COMPILE_DEFINITIONS, 2014-01-13) the COMPILE_DEFINITIONS value contains
a '$' so the EVIS fast-path is no longer used. Instead the full
cmCommandArgumentParserHelper is now used on the large input, which is
very slow (since it was originally created for hand-written code).
Change QT4_CREATE_MOC_COMMAND to a function instead of a macro to avoid
passing large content through EVIS. This makes it significantly faster.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r-- | Modules/Qt4Macros.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 8baf896..5ada030 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -103,7 +103,7 @@ endmacro() # helper macro to set up a moc rule -macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) +function (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) # For Windows, create a parameters file to work around command line length limit # Pass the parameters in a file. Set the working directory to # be that containing the parameters file and reference it by @@ -144,7 +144,7 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) DEPENDS ${infile} ${_moc_working_dir} VERBATIM) -endmacro () +endfunction () macro (QT4_GENERATE_MOC infile outfile ) |