<!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. I tried to recreate the problem in a new project and never could. I even finally took my project, copied it elsewhere, and went through the same exercise, again to no avail. 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 "CMakeFiles", and the other is for *files-only* called "cmake_install.cmake". It has options to match for directories-only, files-only, or files-and-or-directories. This seems to be represented by an integer property called "type". 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 "<filteredResources>".<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>
> I'm new to CMake, and loving it. I'm using version 2.8.11 and have a<BR>
> couple issues with the CDT generator.<BR>
><BR>
><BR>
><BR>
> First, there's really no definitive help (that I've found) for the CDT<BR>
> generator. The HTML generator just simply mentions the generator, it<BR>
> doesn't mention any of the options that I've stumbled upon in mentions out<BR>
> on the open web, such as:<BR>
><BR>
> CMAKE_ECLIPSE_MAKE_ARGUMENTS=<><BR>
><BR>
> You can use this to add things such as "-j4" to increase the number of<BR>
> parallel jobs during builds<BR>
><BR>
> CMAKE_ECLIPSE_VERSION=<><BR>
><BR>
> Setting this to "3.7" for my CDT version made a difference.<BR>
><BR>
><BR>
><BR>
> Are there others? Where are they documented?<BR>
<BR>
They are cache variables. All variables related to the Eclipse generator start<BR>
with "CMAKE_ECLIPSE_".<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>
> The only official help I've found was at<BR>
> <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>
> quite out of date.<BR>
><BR>
><BR>
><BR>
> Secondly, path discovery wasn't nearly automatic. Even after a build,<BR>
> opening a C++ file showed unresolved inclusions for every STL include<BR>
> (such as <iostream>) It took me a while, but I finally found that going<BR>
> to the Project Properties, then "C/C++ project paths", "Path Containers",<BR>
> "Add..." and adding the "Discovered scanner configuration scanner" and<BR>
> doing a fresh build and Index rebuild that everything was fine.<BR>
<BR>
This should work.<BR>
Can you try this with a "Hello world"-style project and send me the resulting<BR>
.cproject file ?<BR>
Maybe also the CMakeCache.txt.<BR>
<BR>
> Finally, doing any edits to the project from WITHIN Eclipse are lost<BR>
> whenever having to re-run cmake. For example, adding project filters to<BR>
> hide "CMakeFiles", Qt4 files (such as *.moc, ui_*.h, etc), these filters<BR>
> are lost if you have to rerun cmake when adding a new source file to the<BR>
> 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 "Hello World"-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>