[cmake-developers] Current deficiencies of automoc

Brad King brad.king at kitware.com
Thu Oct 20 15:08:24 EDT 2016


On 10/20/2016 02:30 PM, Alan W. Irwin wrote:
> The deficiency I found with automoc is (as far as I can tell) it does
> not properly handle the case where the header that should be processed
> by moc is located in a different source-tree directory than the source
> file that includes that header.
[snip]
> To be specific here is the way I believe automoc should work.  If
> 
> #include "moc_<name>.cpp"
> 
> is found in a source file under automoc
> control, then if moc_<name>.cpp could not be found in any of the
> include directories for the target, then search those include
> directories (including source-tree equivalents of build-tree include
> directories) for <name>.h, run moc on that file and place the result
> moc_<name>.cpp in the build directory corresponding to <name.h>.
[snip]
> this is a plea to the CMake developers to fix the above deficiency

Adding to Cc some folks that may have worked on automoc features
in the past.  I have little understanding of the feature myself.
Unless someone steps forward to implement this it is unlikely to
be fixed.

> I hate to lose issues that can be trivially fixed on bug trackers, but
> if the above automoc fix and automoc documentation fix are not
> trivial, then I would be willing to incorporate the above and any
> further discussion here into an official CMake bug report.

Please construct a minimal/complete example source tree/tarball
that demonstrate the layout you'd like to have work.  That will
be helpful in constructing such a bug report.

-Brad



More information about the cmake-developers mailing list