[cmake-developers] Generators and Extra Generators

Alexander Neundorf neundorf at kde.org
Thu Jan 9 11:59:25 EST 2014

On Tuesday 07 January 2014, Stephen Kelly wrote:
> David Cole wrote:
> > There's been a design issue since extra generators were introduced...
> > 
> > The question is: is it possible to resolve it with a better design and
> > still keep the existing functionality?
> Hence this mail :), and my mail to cmake.users about the "Kate Extra
> Generator" being the wrong interface/design.
> I'd like to see cmake generate all the info a UI would need in a simple and
> non-tied-to-a-particular-implementation way. That would be something Qt
> Creator and Kate could use as it would list the targets, the compile lines
> for objects, link targets, link lines etc. 

Actually an IDE may have somewhat different needs.
As long as it uses an existing buildtool (make or ninja), it doesn't actually 
need the commands for linking, and also not necessarily for compiling. (if the 
IDE would execute e.g. the link commands directly instead of calling "make 
foo", then the IDE would need to be a complete buildtool, i.e. with full 
dependency handling between the targets etc.).
It does need information which include dirs and definitions are used, per 
target, probably better per source file, so it can do proper completion etc.
IMO it needs information in which CMakeLists.txt a target has been added, to 
support the user by editing the cmake files.
It needs to know to which target(s) a source file belongs, and vice versa, it 
needs to know the language of each source file (since this can be overridden 
via the LANGUAGE property in cmake).
I'm quite sure IDE developers can think of more they'd like to know.

As I said, it would be really cool if this information could be put complete 
and IDE-independent in a project file. 


More information about the cmake-developers mailing list