[Qt-creator] CMake and Include Files
James
agnosticpope at gmail.com
Tue Jul 14 04:40:50 CEST 2009
The idea of creating a new CMake parsers sounds interesting, but how would
that work exactly? Part of the problem is that include files aren't
contained in the CMake files, so you're still left, at some level, with
parsing the actual c++ files or just adding everything ending in .h.
How does visual studio xml work with CMake? I took a look, but couldn't
find a single header file mentioned in anything...perhaps I'm looking in the
wrong place (I'm not terribly familiar with VS though).
--James
On Fri, Jul 10, 2009 at 8:28 AM, Mike Jackson <imikejackson at gmail.com>wrote:
> 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
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090713/bd3de2ab/attachment.html
More information about the Qt-creator-old
mailing list