[cmake-developers] Autogen subdirectories patches
Brad King
brad.king at kitware.com
Fri Apr 22 09:37:02 EDT 2016
On 04/21/2016 03:14 AM, Sebastian Holtermann wrote:
>> 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.
The rest of the changes are now in 'master'. Thanks for working on this!
> 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.
You should be able to rebase on 'master' now.
> 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.
I'm afraid I'm not familiar enough with this infrastructure to know
for sure. The entire Qt autogen infrastructure was built by others.
Take a look at cmGlobalGenerator::Compute to see a carefully
ordered set of operations. Among them is the QtAutoGenerator step.
I'm not sure of its order relative to INCLUDE_DIRECTORIES evaluation.
Thanks,
-Brad
More information about the cmake-developers
mailing list