Build target to ensure presence of all generated sources (was: Re: cmake question)

Friedrich W. H. Kossebau kossebau at kde.org
Thu Sep 20 13:08:55 BST 2018


Hi,

Am Donnerstag, 20. September 2018, 11:19:23 CEST schrieb René J.V. Bertin:
> This is not a kdevelop question per se, but about something that kdevelop
> users may notice more often than "joe cmake" users:
> 
> Is there a way to generate all the autogen stuff after running cmake? For
> instance, if you import a fresh kdevelop source tree into a kdevelop
> project it will run cmake and thus figure out all dependencies, where
> headers are etc. Most parsing will thus succeed, but not that which
> requires headers and other stuff that is generated during a build (moc
> files, translated .ui files, ...).
> 
> It'd be really useful if you could generate just that in a single. Does
> anyone know if this is possible (might not be depending on cmake alone)?

Not aware of such a feature (in any build system generator), but I would very 
much agree that it would be very helpful to have something like this, a build 
target which could be used to ensure that any generated source has been 
generated.

This is something I am missing very much when using KDevelop just for reading 
existing codebases, but not actually working on them or running them.

Next to KDevelop's code parser this would also benefit other code parsing 
tools which prefer to have a full understanding of the semantics, like static 
code analyzers (clazy, clang-tidy) or documentation tools.

Someone(tm) should start an initiative to add such a generalized thing to 
cmake, so there is a standard target pattern.

Cheers
Friedrich





More information about the KDevelop mailing list