<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.4">
<TITLE>RE: [CMake] CDT generator help: path discovery and other items</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Alex,<BR>
For the first issue of the indexing paths, I'm at a loss.&nbsp; I tried to recreate the problem in a new project and never could.&nbsp; I even finally took my project, copied it elsewhere, and went through the same exercise, again to no avail.&nbsp; If I'm ever able to reproduce it, I'll try to capture what happened.<BR>
<BR>
As for the filter issue, I'm attaching before and after versions of the .project file where I add two kinds of filters: the first is for *directories-only* called &quot;CMakeFiles&quot;, and the other is for *files-only* called &quot;cmake_install.cmake&quot;.&nbsp; It has options to match for directories-only, files-only, or files-and-or-directories.&nbsp; This seems to be represented by an integer property called &quot;type&quot;.&nbsp; Eclipse seemed to make many other minor changes to the .project file, but look for the filters section near the bottom in a section called &quot;&lt;filteredResources&gt;&quot;.<BR>
<BR>
-Lee<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: cmake-bounces@cmake.org on behalf of Alexander Neundorf<BR>
Sent: Mon 6/3/2013 3:44 PM<BR>
To: cmake@cmake.org<BR>
Cc: Dixon, Joel L.<BR>
Subject: Re: [CMake] CDT generator help: path discovery and other items<BR>
<BR>
On Monday 03 June 2013, Dixon, Joel L. wrote:<BR>
&gt; I'm new to CMake, and loving it.&nbsp; I'm using version 2.8.11 and have a<BR>
&gt; couple issues with the CDT generator.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; First, there's really no definitive help (that I've found) for the CDT<BR>
&gt; generator.&nbsp; The HTML generator just simply mentions the generator, it<BR>
&gt; doesn't mention any of the options that I've stumbled upon in mentions out<BR>
&gt; on the open web, such as:<BR>
&gt;<BR>
&gt;&nbsp;&nbsp; CMAKE_ECLIPSE_MAKE_ARGUMENTS=&lt;&gt;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; You can use this to add things such as &quot;-j4&quot; to increase the number of<BR>
&gt; parallel jobs during builds<BR>
&gt;<BR>
&gt;&nbsp;&nbsp; CMAKE_ECLIPSE_VERSION=&lt;&gt;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; Setting this to &quot;3.7&quot; for my CDT version made a difference.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Are there others?&nbsp; Where are they documented?<BR>
<BR>
They are cache variables. All variables related to the Eclipse generator start<BR>
with &quot;CMAKE_ECLIPSE_&quot;.<BR>
I recommend you use cmake-gui, then you see all CMAKE_ECLIPSE_* variables.<BR>
Putting the mouse cursor above the variable shows documentation for the<BR>
variable in a tooltip. For the versions there is a combobox which provides<BR>
only the supported versions.<BR>
<BR>
Beside that, you are right that the variables are undocumented.<BR>
All of them are set in Modules/CMakeFindEclipseCDT4.cmake. You may have a look<BR>
in that file.<BR>
<BR>
<BR>
&gt; The only official help I've found was at<BR>
&gt; <A HREF="http://www.cmake.org/Wiki/Eclipse_CDT4_Generator">http://www.cmake.org/Wiki/Eclipse_CDT4_Generator</A>, and this seems to be<BR>
&gt; quite out of date.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Secondly, path discovery wasn't nearly automatic.&nbsp; Even after a build,<BR>
&gt; opening a C++ file showed unresolved inclusions for every STL include<BR>
&gt; (such as &lt;iostream&gt;)&nbsp; It took me a while, but I finally found that going<BR>
&gt; to the Project Properties, then &quot;C/C++ project paths&quot;, &quot;Path Containers&quot;,<BR>
&gt; &quot;Add...&quot; and adding the &quot;Discovered scanner configuration scanner&quot; and<BR>
&gt; doing a fresh build and Index rebuild that everything was fine.<BR>
<BR>
This should work.<BR>
Can you try this with a &quot;Hello world&quot;-style project and send me the resulting<BR>
.cproject file ?<BR>
Maybe also the CMakeCache.txt.<BR>
<BR>
&gt; Finally, doing any edits to the project from WITHIN Eclipse are lost<BR>
&gt; whenever having to re-run cmake.&nbsp; For example, adding project filters to<BR>
&gt; hide &quot;CMakeFiles&quot;, Qt4 files (such as *.moc, ui_*.h, etc), these filters<BR>
&gt; are lost if you have to rerun cmake when adding a new source file to the<BR>
&gt; project.<BR>
<BR>
Yes, the .project and .cproject files are completely regenerated on each cmake<BR>
run.<BR>
How do you want to hide CMakeFiles/, in which places is this hidden then ?<BR>
Can you again, create a &quot;Hello World&quot;-style project, manually add a filter for<BR>
CMakeFiles/, and send me the .project and .cproject files ?<BR>
(this can be the same files as above).<BR>
<BR>
<BR>
Eclipse does have some issues, where cmake simply cannot help.<BR>
Some settings are stored neither in the .project nor in the .cproject files,<BR>
but inside the workspace metedata, which cmake cannot touch (because it is<BR>
somewhere else, it is binary, undocumented, etc.).<BR>
<BR>
Also, Eclipse only open the version control plugins inside the project<BR>
directory. Now with cmake out-of-source builds the project files for Eclipse<BR>
are generated in the build tree, not in the source tree, and Eclipse doesn't<BR>
see version control files there, so it never opens the version control<BR>
plugins. I would naively assume that it shouldn't be too hard to add an entry<BR>
SourceRootDir or something like that to the .project file, which, if set,<BR>
would then be used instead of the directory of .project. Then cmake could<BR>
simply write that tag into the .project file and Eclipse would be able to<BR>
handle it. But for that it needs somebody deep in Eclipse to add support for<BR>
that inside Eclipse.<BR>
<BR>
<BR>
Alex<BR>
--<BR>
<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
<BR>
Please keep messages on-topic and check the CMake FAQ at: <A HREF="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</A><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<A HREF="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>