[Qt-creator] CMake and Include Files

Mike Jackson imikejackson at gmail.com
Wed Jul 15 15:27:28 CEST 2009


I think Creator was using the CodeBlocks generator and not the KDevelop 
one that I stated earlier.

   As far as the include paths go CMake will find all the include paths 
that are listed out in the CMakeLists.txt file. Usually through calls 
like "include_directories" in the CMakeLists.txt files. In the 
CodeBlocks generated XML file I think some of those were missing maybe 
which is why we went looking in the visual studio xml files to see if 
there were a more complete list, which there is.

In the end it is probably going to take someone intimate with both 
CMake and Creator (or a collaboration between kitware and nokia 
software) to get this done.. or someone else with a _lot_ of time on 
their hands.

  I would like to help but I am buried in other work currently.

Mike Jackson

On 2009-07-14 13:55:35 -0400, James <agnosticpope at gmail.com> said:

> 
> I've tried this more or less -- in fact I have my own parser for the current
> XML file generated from cmake code blocks option.  Haven't messed around
> with creating my own XML file with cmake though.
> 
> So, I guess what I don't understand, is that it seems like the
> CMakelists.txt files are themselves incomplete and while one could write
> another parser for them in Cmake, then how would you find the headers?
> Wouldn't they still be missing?  Or does cmake find them in some way?  After
> all, cmake is a build manager, not a code manager, and at some basic level,
> it only cares about include paths, not include files.  I wrote my own native
> cmakelist.txt parser for creator a while back (and still have it somewhere),
> so I'm somewhat familiar with the problem/question.
> 
> If you'd like, I can post my current solution for parsing which seems to do
> a reasonably good job, based off of the current XML file from codeblocks.
> I'm using it to work on a fairly large project (a few hundred source files,
> some UI files, multiple directories) and the results are much better than
> the current release, IMHO, but it's not perfect, since in the end, I use a
> heuristic to try and find headers that aren't in cmakelists.
> 
> --James
> 
> 
> On Tue, Jul 14, 2009 at 12:15 PM, Mike Jackson <imikejackson at gmail.com>wrote:
> 
>> At some point Creator would actually generate a KDevelop project file
>> from your cmake based project by actually invoking CMake from creator.
>> This created an XML based file that Creator would then parse to gain
>> information about what/where to build things. This was slow and error
>> prone and tended to be missing information. There was a discussion on
>> the IRC channel that basically said there needs to be a "QtCreator"
>> option for CMake. CMake would then generate an XML File that has all
>> the information that QtCreator would need to create a project. It was
>> stated in the same IRC conversation that the only thing closest to what
>> was needed was the Visual studio project/solution files (since they are
>> XML). Using the Visual Studio Generator as a starting point for
>> creating a "QtCreator Generator" was then born. Of course once you have
>> cmake generating some XML files then you need QtCreator to be able to
>> parse the information contained in them.
>> 
>> So to get started you would need to do the following:
>> Pull the Latest CVS version of CMake.
>> Study the code to figure out what needs to be done to create a new
>> generator.
>> Write the new generator for QtCreator (or append to the KDevelop one).
>> Test said generator on a project.
>> 
>> Clone the latest version of QtCreator.
>> Find where the parsing of the XML files is happening
>> Add code to parse more detailed information from the new xml files that
>> were generated earlier.
>> Compile QtCreator
>> Test it out with the new project xml files that were generated with
>> CMake from above.
>> 
>> 
>> There is also the idea to have CMake generate .pro files but this was
>> quickly passed off as being too labor intensive/difficult to create.
>> 
>> Of course the third option would be for Qt to drop qmake and go with
>> CMake instead ;-)
>> 
>> Mike Jackson
>> 
>> On 2009-07-13 22:40:50 -0400, James <agnosticpope at gmail.com> said:
>> 
>>> 
>>> 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
>>>> 
>>> 
>>> 
>>> The idea of creating a new CMake parsers sounds interesting, but how
>> would =
>>> that work exactly?=A0 Part of the problem is that include files
>> aren&#39;t =
>>> contained in the CMake files, so you&#39;re still left, at some level,
>> with=
>>> parsing the actual c++ files or just adding everything ending in .h.<br>
>>> <br>How does visual studio xml work with CMake?=A0 I took a look, but
>> could=
>>> n&#39;t find a single header file mentioned in anything...perhaps I&#39;m
>> l=
>>> ooking in the wrong place (I&#39;m not terribly familiar with VS
>> though).<b=
>>> r>
>>> <br>--James<br><br><div class=3D"gmail_quote">On Fri, Jul 10, 2009 at
>> 8:28 =
>>> AM, Mike Jackson <span dir=3D"ltr">&lt;<a href=3D"mailto:
>> imikejackson at gmail=
>>> .com">imikejackson at gmail.com</a>&gt;</span> wrote:<br><blockquote
>> class=3D"=
>>> gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin:
>> 0p=
>>> t 0pt 0pt 0.8ex; padding-left: 1ex;">
>>> I tried Creator with CMake but there was _too_ much that I still had
>> to<br>
>>> do on my own for each project to get things to work.<br>
>>> =A0I know that several ideas had been discussed (mainly in the irc<br>
>>> channel) like creating a new generator for CMake that would produce
>> xml<br>
>>> files that had all the needed information. I don&#39;t think this is
>> going<=
>>> br>
>>> anywhere as it really needs someone with the time to jump into the<br>
>>> catch-22 loop and start coding it up, both in CMake and in Creator.<br>
>>> <br>
>>> =A0You need CMake to generate a QtCreator readable XML file. And you<br>
>>> need Creator to be able to parse it. I think after that a lot of the<br>
>>> issues with code completion would be mitigated as all the proper<br>
>>> include directories would be listed in the xml file that cmake
>> produced.<br=
>>>> 
>>> <br>
>>> =A0The Visual Studio XML files are pretty close to what is needed as<br>
>>> they have the most information. So starting with a clone of the
>> Visual<br>
>>> Studio CMake Generator code might be a good start.<br>
>>> <br>
>>> =A0Just my thoughts..<br>
>>> <br>
>>> Mike Jackson<br>
>>> <div><div></div><div class=3D"h5"><br>
>>> On 2009-07-07 22:28:33 -0400, James &lt;<a href=3D"mailto:
>> agnosticpope at gmai=
>>> l.com">agnosticpope at gmail.com</a>&gt; said:<br>
>>> <br>
>>> &gt;<br>
>>> &gt; Since I&#39;ve been using Creator (1.0), cmake support has gotten
>> much=
>>> better.<br>
>>> &gt;<br>
>>> &gt; Unfortunately, unless there&#39;s some step I&#39;m missing, it
>> still =
>>> doesn&#39;t parse<br>
>>> &gt; files for autocompletion information. =A0Additionally, since CMake
>> fil=
>>> es don&#39;t<br>
>>> &gt; necessarily include all the headers, the project tree itself may not
>> e=
>>> ven be<br>
>>> &gt; complete.<br>
>>> &gt;<br>
>>> &gt; While I&#39;ve been using it, I was maintaining a small modification
>> t=
>>> hat looked<br>
>>> &gt; for a foo.h whenever parsing a foo.c++ (and if found added it) and
>> als=
>>> o used<br>
>>> &gt; the file extension to sort the headers from the source files.<br>
>>> &gt; Unfortunately, things started behaving strangely this Monday as I
>> thin=
>>> k the<br>
>>> &gt; most recent mod broke my change;)<br>
>>> &gt;<br>
>>> &gt; I&#39;m not wholly happy with my solution, and I&#39;d be more than
>> ha=
>>> ppy to help or<br>
>>> &gt; write a proper solution to better accommodate CMake. =A0IMHO,
>> there&#3=
>>> 9;s two<br>
>>> &gt; issues: adding all headers properly and properly catagorizing the
>> file=
>>> s so<br>
>>> &gt; that they can be parsed. =A0There&#39;s various ways of doing this,
>> no=
>>> ne of which<br>
>>> &gt; are very good. =A0There&#39;s my current solution, which misses
>> files.=
>>> =A0It&#39;d also<br>
>>> &gt; be possible to parse every source file and look for includes, maybe
>> wi=
>>> th<br>
>>> &gt; some assumption about having them at the beginning, but probably
>> would=
>>> be<br>
>>> &gt; very slow. =A0A third would be to just look in every directory
>> parsed =
>>> for<br>
>>> &gt; header files, which, again, may get stuff that&#39;s unused.<br>
>>> &gt;<br>
>>> &gt; What are the community/trolltech&#39;s thoughts on this? =A0Or am I
>> th=
>>> e only one<br>
>>> &gt; who uses Creator with CMake;)<br>
>>> &gt;<br>
>>> &gt; --James<br>
>>> <br>
>>> </div></div>_______________________________________________<br>
>>> Qt-creator mailing list<br>
>>> <a href=3D"mailto:Qt-creator at trolltech.com">Qt-creator at trolltech.com
>> </a><br=
>>>> 
>>> <a href=3D"http://lists.trolltech.com/mailman/listinfo/qt-creator"
>> target=
>>> =3D"_blank">http://lists.trolltech.com/mailman/listinfo/qt-creator
>> </a><br>
>>> </blockquote></div><br>
>> 
>> 
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>> 
> 
> 
> I&#39;ve tried this more or less -- in fact I have my own parser for the cu=
> rrent XML file generated from cmake code blocks option.=A0 Haven&#39;t mess=
> ed around with creating my own XML file with cmake though.<br><br>So, I gue=
> ss what I don&#39;t understand, is that it seems like the CMakelists.txt fi=
> les are themselves incomplete and while one could write another parser for =
> them in Cmake, then how would you find the headers?=A0 Wouldn&#39;t they st=
> ill be missing?=A0 Or does cmake find them in some way?=A0 After all, cmake=
>  is a build manager, not a code manager, and at some basic level, it only c=
> ares about include paths, not include files.=A0 I wrote my own native cmake=
> list.txt parser for creator a while back (and still have it somewhere), so =
> I&#39;m somewhat familiar with the problem/question.<br>
> <br>If you&#39;d like, I can post my current solution for parsing which see=
> ms to do a reasonably good job, based off of the current XML file from code=
> blocks.=A0 I&#39;m using it to work on a fairly large project (a few hundre=
> d source files, some UI files, multiple directories) and the results are mu=
> ch better than the current release, IMHO, but it&#39;s not perfect, since i=
> n the end, I use a heuristic to try and find headers that aren&#39;t in cma=
> kelists.<br>
> <br>--James<br><br><br><div class=3D"gmail_quote">On Tue, Jul 14, 2009 at 1=
> 2:15 PM, Mike Jackson <span dir=3D"ltr">&lt;<a href=3D"mailto:imikejackson@=
> gmail.com">imikejackson at gmail.com</a>&gt;</span> wrote:<br><blockquote clas=
> s=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margi=
> n: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> At some point Creator would actually generate a KDevelop project file<br>
> from your cmake based project by actually invoking CMake from creator.<br>
> This created an XML based file that Creator would then parse to gain<br>
> information about what/where to build things. This was slow and error<br>
> prone and tended to be missing information. There was a discussion on<br>
> the IRC channel that basically said there needs to be a &quot;QtCreator&quo=
> t;<br>
> option for CMake. CMake would then generate an XML File that has all<br>
> the information that QtCreator would need to create a project. It was<br>
> stated in the same IRC conversation that the only thing closest to what<br>
> was needed was the Visual studio project/solution files (since they are<br>
> XML). Using the Visual Studio Generator as a starting point for<br>
> creating a &quot;QtCreator Generator&quot; was then born. Of course once yo=
> u have<br>
> cmake generating some XML files then you need QtCreator to be able to<br>
> parse the information contained in them.<br>
> <br>
>  =A0So to get started you would need to do the following:<br>
> Pull the Latest CVS version of CMake.<br>
> Study the code to figure out what needs to be done to create a new generato=
> r.<br>
> Write the new generator for QtCreator (or append to the KDevelop one).<br>
> Test said generator on a project.<br>
> <br>
> Clone the latest version of QtCreator.<br>
> Find where the parsing of the XML files is happening<br>
> Add code to parse more detailed information from the new xml files that<br>
> were generated earlier.<br>
> Compile QtCreator<br>
> Test it out with the new project xml files that were generated with<br>
> CMake from above.<br>
> <br>
> <br>
> There is also the idea to have CMake generate .pro files but this was<br>
> quickly passed off as being too labor intensive/difficult to create.<br>
> <br>
> Of course the third option would be for Qt to drop qmake and go with<br>
> CMake instead ;-)<br>
> <br>
> Mike Jackson<br>
> <div><div></div><div class=3D"h5"><br>
> On 2009-07-13 22:40:50 -0400, James &lt;<a href=3D"mailto:agnosticpope at gmai=
> l.com">agnosticpope at gmail.com</a>&gt; said:<br>
> <br>
> &gt;<br>
> &gt; The idea of creating a new CMake parsers sounds interesting, but how w=
> ould<br>
> &gt; that work exactly? =A0Part of the problem is that include files aren&#=
> 39;t<br>
> &gt; contained in the CMake files, so you&#39;re still left, at some level,=
>  with<br>
> &gt; parsing the actual c++ files or just adding everything ending in .h.<b=
> r>
> &gt;<br>
> &gt; How does visual studio xml work with CMake? =A0I took a look, but coul=
> dn&#39;t<br>
> &gt; find a single header file mentioned in anything...perhaps I&#39;m look=
> ing in the<br>
> &gt; wrong place (I&#39;m not terribly familiar with VS though).<br>
> &gt;<br>
> &gt; --James<br>
> &gt;<br>
> &gt; On Fri, Jul 10, 2009 at 8:28 AM, Mike Jackson &lt;<a href=3D"mailto:im=
> ikejackson at gmail.com">imikejackson at gmail.com</a>&gt;wrote:<br>
> &gt;<br>
> &gt;&gt; I tried Creator with CMake but there was _too_ much that I still h=
> ad to<br>
> &gt;&gt; do on my own for each project to get things to work.<br>
> &gt;&gt; I know that several ideas had been discussed (mainly in the irc<br=
>> 
> &gt;&gt; channel) like creating a new generator for CMake that would produc=
> e xml<br>
> &gt;&gt; files that had all the needed information. I don&#39;t think this =
> is going<br>
> &gt;&gt; anywhere as it really needs someone with the time to jump into the=
> <br>
> &gt;&gt; catch-22 loop and start coding it up, both in CMake and in Creator=
> .<br>
> &gt;&gt;<br>
> &gt;&gt; You need CMake to generate a QtCreator readable XML file. And you<=
> br>
> &gt;&gt; need Creator to be able to parse it. I think after that a lot of t=
> he<br>
> &gt;&gt; issues with code completion would be mitigated as all the proper<b=
> r>
> &gt;&gt; include directories would be listed in the xml file that cmake pro=
> duced.<br>
> &gt;&gt;<br>
> &gt;&gt; The Visual Studio XML files are pretty close to what is needed as<=
> br>
> &gt;&gt; they have the most information. So starting with a clone of the Vi=
> sual<br>
> &gt;&gt; Studio CMake Generator code might be a good start.<br>
> &gt;&gt;<br>
> &gt;&gt; Just my thoughts..<br>
> &gt;&gt;<br>
> &gt;&gt; Mike Jackson<br>
> &gt;&gt;<br>
> &gt;&gt; On 2009-07-07 22:28:33 -0400, James &lt;<a href=3D"mailto:agnostic=
> pope at gmail.com">agnosticpope at gmail.com</a>&gt; said:<br>
> &gt;&gt;<br>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; Since I&#39;ve been using Creator (1.0), cmake support has got=
> ten much<br>
> &gt;&gt; better.<br>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; Unfortunately, unless there&#39;s some step I&#39;m missing, i=
> t still doesn&#39;t<br>
> &gt;&gt; parse<br>
> &gt;&gt;&gt; files for autocompletion information. =A0Additionally, since C=
> Make files<br>
> &gt;&gt; don&#39;t<br>
> &gt;&gt;&gt; necessarily include all the headers, the project tree itself m=
> ay not even<br>
> &gt;&gt; be<br>
> &gt;&gt;&gt; complete.<br>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; While I&#39;ve been using it, I was maintaining a small modifi=
> cation that<br>
> &gt;&gt; looked<br>
> &gt;&gt;&gt; for a foo.h whenever parsing a foo.c++ (and if found added it)=
>  and also<br>
> &gt;&gt; used<br>
> &gt;&gt;&gt; the file extension to sort the headers from the source files.<=
> br>
> &gt;&gt;&gt; Unfortunately, things started behaving strangely this Monday a=
> s I think<br>
> &gt;&gt; the<br>
> &gt;&gt;&gt; most recent mod broke my change;)<br>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; I&#39;m not wholly happy with my solution, and I&#39;d be more=
>  than happy to help<br>
> &gt;&gt; or<br>
> &gt;&gt;&gt; write a proper solution to better accommodate CMake. =A0IMHO, =
> there&#39;s two<br>
> &gt;&gt;&gt; issues: adding all headers properly and properly catagorizing =
> the files<br>
> &gt;&gt; so<br>
> &gt;&gt;&gt; that they can be parsed. =A0There&#39;s various ways of doing =
> this, none of<br>
> &gt;&gt; which<br>
> &gt;&gt;&gt; are very good. =A0There&#39;s my current solution, which misse=
> s files. =A0It&#39;d<br>
> &gt;&gt; also<br>
> &gt;&gt;&gt; be possible to parse every source file and look for includes, =
> maybe with<br>
> &gt;&gt;&gt; some assumption about having them at the beginning, but probab=
> ly would be<br>
> &gt;&gt;&gt; very slow. =A0A third would be to just look in every directory=
>  parsed for<br>
> &gt;&gt;&gt; header files, which, again, may get stuff that&#39;s unused.<b=
> r>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; What are the community/trolltech&#39;s thoughts on this? =A0Or=
>  am I the only<br>
> &gt;&gt; one<br>
> &gt;&gt;&gt; who uses Creator with CMake;)<br>
> &gt;&gt;&gt;<br>
> &gt;&gt;&gt; --James<br>
> &gt;&gt;<br>
> &gt;&gt; _______________________________________________<br>
> &gt;&gt; Qt-creator mailing list<br>
> &gt;&gt; <a href=3D"mailto:Qt-creator at trolltech.com">Qt-creator at trolltech.c=
> om</a><br>
> &gt;&gt; <a href=3D"http://lists.trolltech.com/mailman/listinfo/qt-creator"=
>  target=3D"_blank">http://lists.trolltech.com/mailman/listinfo/qt-creator</=
> a><br>
> &gt;&gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; The idea of creating a new CMake parsers sounds interesting, but how w=
> ould =3D<br>
> </div></div>&gt; that work exactly?=3DA0 Part of the problem is that includ=
> e files aren&amp;#39;t =3D<br>
> &gt; contained in the CMake files, so you&amp;#39;re still left, at some le=
> vel, with=3D<br>
> &gt; =A0parsing the actual c++ files or just adding everything ending in .h=
> .&lt;br&gt;<br>
> &gt; &lt;br&gt;How does visual studio xml work with CMake?=3DA0 I took a lo=
> ok, but could=3D<br>
> &gt; n&amp;#39;t find a single header file mentioned in anything...perhaps =
> I&amp;#39;m l=3D<br>
> &gt; ooking in the wrong place (I&amp;#39;m not terribly familiar with VS t=
> hough).&lt;b=3D<br>
> &gt; r&gt;<br>
> &gt; &lt;br&gt;--James&lt;br&gt;&lt;br&gt;&lt;div class=3D3D&quot;gmail_quo=
> te&quot;&gt;On Fri, Jul 10, 2009 at 8:28 =3D<br>
> &gt; AM, Mike Jackson &lt;span dir=3D3D&quot;ltr&quot;&gt;&amp;lt;&lt;a hre=
> f=3D3D&quot;mailto:<a href=3D"mailto:imikejackson at gmail">imikejackson at gmail=
> </a>=3D<br>
> &gt; .com&quot;&gt;<a href=3D"mailto:imikejackson at gmail.com">imikejackson at g=
> mail.com</a>&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote =
> class=3D3D&quot;=3D<br>
> &gt; gmail_quote&quot; style=3D3D&quot;border-left: 1px solid rgb(204, 204,=
>  204); margin: 0p=3D<br>
> &gt; t 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;<br>
> &gt; I tried Creator with CMake but there was _too_ much that I still had t=
> o&lt;br&gt;<br>
> &gt; do on my own for each project to get things to work.&lt;br&gt;<br>
> &gt; =A0=3DA0I know that several ideas had been discussed (mainly in the ir=
> c&lt;br&gt;<br>
> &gt; channel) like creating a new generator for CMake that would produce xm=
> l&lt;br&gt;<br>
> &gt; files that had all the needed information. I don&amp;#39;t think this =
> is going&lt;=3D<br>
> &gt; br&gt;<br>
> &gt; anywhere as it really needs someone with the time to jump into the&lt;=
> br&gt;<br>
> &gt; catch-22 loop and start coding it up, both in CMake and in Creator.&lt=
> ;br&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; =A0=3DA0You need CMake to generate a QtCreator readable XML file. And =
> you&lt;br&gt;<br>
> &gt; need Creator to be able to parse it. I think after that a lot of the&l=
> t;br&gt;<br>
> &gt; issues with code completion would be mitigated as all the proper&lt;br=
> &gt;<br>
> &gt; include directories would be listed in the xml file that cmake produce=
> d.&lt;br=3D<br>
> &gt;&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; =A0=3DA0The Visual Studio XML files are pretty close to what is needed=
>  as&lt;br&gt;<br>
> &gt; they have the most information. So starting with a clone of the Visual=
> &lt;br&gt;<br>
> &gt; Studio CMake Generator code might be a good start.&lt;br&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; =3DA0Just my thoughts..&lt;br&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; Mike Jackson&lt;br&gt;<br>
> &gt; &lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=3D3D&quot;h5&quot;&gt;=
> &lt;br&gt;<br>
> &gt; On 2009-07-07 22:28:33 -0400, James &amp;lt;&lt;a href=3D3D&quot;mailt=
> o:<a href=3D"mailto:agnosticpope at gmai">agnosticpope at gmai</a>=3D<br>
> &gt; <a href=3D"http://l.com" target=3D"_blank">l.com</a>&quot;&gt;<a href=
> =3D"mailto:agnosticpope at gmail.com">agnosticpope at gmail.com</a>&lt;/a&gt;&amp=
> ;gt; said:&lt;br&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; Since I&amp;#39;ve been using Creator (1.0), cmake support ha=
> s gotten much=3D<br>
> &gt; =A0better.&lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; Unfortunately, unless there&amp;#39;s some step I&amp;#39;m m=
> issing, it still =3D<br>
> &gt; doesn&amp;#39;t parse&lt;br&gt;<br>
> &gt; &amp;gt; files for autocompletion information. =3DA0Additionally, sinc=
> e CMake fil=3D<br>
> &gt; es don&amp;#39;t&lt;br&gt;<br>
> &gt; &amp;gt; necessarily include all the headers, the project tree itself =
> may not e=3D<br>
> &gt; ven be&lt;br&gt;<br>
> &gt; &amp;gt; complete.&lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; While I&amp;#39;ve been using it, I was maintaining a small m=
> odification t=3D<br>
> &gt; hat looked&lt;br&gt;<br>
> &gt; &amp;gt; for a foo.h whenever parsing a foo.c++ (and if found added it=
> ) and als=3D<br>
> &gt; o used&lt;br&gt;<br>
> &gt; &amp;gt; the file extension to sort the headers from the source files.=
> &lt;br&gt;<br>
> &gt; &amp;gt; Unfortunately, things started behaving strangely this Monday =
> as I thin=3D<br>
> &gt; k the&lt;br&gt;<br>
> &gt; &amp;gt; most recent mod broke my change;)&lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; I&amp;#39;m not wholly happy with my solution, and I&amp;#39;=
> d be more than ha=3D<br>
> &gt; ppy to help or&lt;br&gt;<br>
> &gt; &amp;gt; write a proper solution to better accommodate CMake. =3DA0IMH=
> O, there&amp;#3=3D<br>
> &gt; 9;s two&lt;br&gt;<br>
> &gt; &amp;gt; issues: adding all headers properly and properly catagorizing=
>  the file=3D<br>
> &gt; s so&lt;br&gt;<br>
> &gt; &amp;gt; that they can be parsed. =3DA0There&amp;#39;s various ways of=
>  doing this, no=3D<br>
> &gt; ne of which&lt;br&gt;<br>
> &gt; &amp;gt; are very good. =3DA0There&amp;#39;s my current solution, whic=
> h misses files.=3D<br>
> &gt; =A0=3DA0It&amp;#39;d also&lt;br&gt;<br>
> &gt; &amp;gt; be possible to parse every source file and look for includes,=
>  maybe wi=3D<br>
> &gt; th&lt;br&gt;<br>
> &gt; &amp;gt; some assumption about having them at the beginning, but proba=
> bly would=3D<br>
> &gt; =A0be&lt;br&gt;<br>
> &gt; &amp;gt; very slow. =3DA0A third would be to just look in every direct=
> ory parsed =3D<br>
> &gt; for&lt;br&gt;<br>
> &gt; &amp;gt; header files, which, again, may get stuff that&amp;#39;s unus=
> ed.&lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; What are the community/trolltech&amp;#39;s thoughts on this? =
> =3DA0Or am I th=3D<br>
> &gt; e only one&lt;br&gt;<br>
> &gt; &amp;gt; who uses Creator with CMake;)&lt;br&gt;<br>
> &gt; &amp;gt;&lt;br&gt;<br>
> &gt; &amp;gt; --James&lt;br&gt;<br>
> &gt; &lt;br&gt;<br>
> &gt; &lt;/div&gt;&lt;/div&gt;______________________________________________=
> _&lt;br&gt;<br>
> &gt; Qt-creator mailing list&lt;br&gt;<br>
> &gt; &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:Qt-creator at trolltech.com=
> ">Qt-creator at trolltech.com</a>&quot;&gt;<a href=3D"mailto:Qt-creator at trollt=
> ech.com">Qt-creator at trolltech.com</a>&lt;/a&gt;&lt;br=3D<br>
> &gt;&gt;<br>
> &gt; &lt;a href=3D3D&quot;<a href=3D"http://lists.trolltech.com/mailman/lis=
> tinfo/qt-creator" target=3D"_blank">http://lists.trolltech.com/mailman/list=
> info/qt-creator</a>&quot; target=3D<br>
> &gt; =3D3D&quot;_blank&quot;&gt;<a href=3D"http://lists.trolltech.com/mailm=
> an/listinfo/qt-creator" target=3D"_blank">http://lists.trolltech.com/mailma=
> n/listinfo/qt-creator</a>&lt;/a&gt;&lt;br&gt;<br>
> &gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;<br>
> <div><div></div><div class=3D"h5"><br>
> <br>
> _______________________________________________<br>
> Qt-creator mailing list<br>
> <a href=3D"mailto:Qt-creator at trolltech.com">Qt-creator at trolltech.com</a><br=
>> 
> <a href=3D"http://lists.trolltech.com/mailman/listinfo/qt-creator" target=
> =3D"_blank">http://lists.trolltech.com/mailman/listinfo/qt-creator</a><br>
> </div></div></blockquote></div><br>





More information about the Qt-creator-old mailing list