[Qt-creator] CMake and Include Files

Mike Jackson imikejackson at gmail.com
Fri Jul 10 15:28:10 CEST 2009


I tried Creator with CMake but there was _too_ much that I still had to 
do on my own for each project to get things to work.
  I know that several ideas had been discussed (mainly in the irc 
channel) like creating a new generator for CMake that would produce xml 
files that had all the needed information. I don't think this is going 
anywhere as it really needs someone with the time to jump into the 
catch-22 loop and start coding it up, both in CMake and in Creator.

  You need CMake to generate a QtCreator readable XML file. And you 
need Creator to be able to parse it. I think after that a lot of the 
issues with code completion would be mitigated as all the proper 
include directories would be listed in the xml file that cmake produced.

  The Visual Studio XML files are pretty close to what is needed as 
they have the most information. So starting with a clone of the Visual 
Studio CMake Generator code might be a good start.

 Just my thoughts..

Mike Jackson

On 2009-07-07 22:28:33 -0400, James <agnosticpope at gmail.com> said:

> 
> Since I've been using Creator (1.0), cmake support has gotten much better.
> 
> Unfortunately, unless there's some step I'm missing, it still doesn't parse
> files for autocompletion information.  Additionally, since CMake files don't
> necessarily include all the headers, the project tree itself may not even be
> complete.
> 
> While I've been using it, I was maintaining a small modification that looked
> for a foo.h whenever parsing a foo.c++ (and if found added it) and also used
> the file extension to sort the headers from the source files.
> Unfortunately, things started behaving strangely this Monday as I think the
> most recent mod broke my change;)
> 
> I'm not wholly happy with my solution, and I'd be more than happy to help or
> write a proper solution to better accommodate CMake.  IMHO, there's two
> issues: adding all headers properly and properly catagorizing the files so
> that they can be parsed.  There's various ways of doing this, none of which
> are very good.  There's my current solution, which misses files.  It'd also
> be possible to parse every source file and look for includes, maybe with
> some assumption about having them at the beginning, but probably would be
> very slow.  A third would be to just look in every directory parsed for
> header files, which, again, may get stuff that's unused.
> 
> What are the community/trolltech's thoughts on this?  Or am I the only one
> who uses Creator with CMake;)
> 
> --James




More information about the Qt-creator-old mailing list