[CMake] Patch to FindQt4.cmake for supporting moc compiler options
clinton at elemtech.com
clinton at elemtech.com
Tue Nov 27 12:36:22 EST 2007
On Saturday 24 November 2007 3:23:16 pm Miguel A. Figueroa-Villanueva wrote:
> Hello,
>
> I would like to propose the following patch or something similar to
> add support for moc compiler options. Currently, one can do the
> following:
>
> SET(moc-sources foo.h bar.h)
> QT4_WRAP_CPP(sources ${moc-sources})
>
> With the attached patch one could pass also options to be invoked with
> each moc-source:
>
> QT4_WRAP_CPP(sources ${moc-sources} OPTIONS -DMYDEF)
>
> The current approach is a simplified one to support the following syntax:
>
> QT4_WRAP_CPP(<outputfiles> <moc-sources> [OPTIONS opt1 opt2 ...])
>
> This could also be applied to QT4_WRAP_UI(...).
>
> --Miguel
I'm curious what the convention is for adding arguments to custom commands in
macros.
To compare, I see the FindSWIG.cmake/UseSWIG.cmake allow setting the
CMAKE_SWIG_FLAGS variable. The advantage of that is that it applies to all
calls of the macro.
Clint
More information about the CMake
mailing list