[cmake-developers] Autogen subdirectories patches

Sebastian Holtermann seblist at xwmw.org
Thu Apr 21 03:14:01 EDT 2016


Am 19.04.2016 um 19:28 schrieb Brad King:
> On 04/19/2016 11:09 AM, Sebastian Holtermann wrote:
>> https://cmake.org/Bug/view.php?id=12873
>> https://cmake.org/Bug/view.php?id=16068
>>
>> They introduce
>> - same name collision checks during moc/qrc/ui generation
>> - moc/qrc generation in subdirectories to support
>>     sources with the name in different subdirectories
>> - A test for equally named sources in different subdirectories
>>
>> Please review.
>
> Thanks!  I've applied them locally and merged the cleanup/refactoring
> commits to 'next' for testing first.  Once those test cleanly I'll move
> on to the rest.

It is good too see the patches made it into the next branch.
Thanks and sorry for the wrong indentation btw..


Now there is another issue I have a partially fix for.

As of now all included mocs and uis get generated in
CMAKE_CURRENT_BINARY_DIR/
because they must be within INCLUDE_DIRECTORIES.
I think a more robust approach would be to generate them in
CMAKE_CURRENT_BINARY_DIR/TARGET_automoc.dir/
and to add the _automoc.dir to INCLUDE_DIRECTORIES.

I've attached a patch that does does so
- it is relative to current "next" branch.

It is incomplete though because I didn't manage to get
CMAKE_CURRENT_BINARY_DIR/TARGET_automoc.dir/
into INCLUDE_DIRECTORIES in Source/cmQtAutoGeneratorInitializer.cxx.
(GetAutogenTargetBuildDir() in Source/cmQtAutoGeneratorInitializer.cxx)

If someone could do that or give me pointers on how to do it
then this could be another improvement.

-Sebastian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Autogen-Generate-included-moc-and-ui-files-in-TARGET.patch
Type: text/x-patch
Size: 2203 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160421/a4c90d88/attachment.bin>


More information about the cmake-developers mailing list