MantisBT - CMake
View Issue Details
0013596CMakeCMakepublic2012-10-18 17:362015-01-13 14:32
Chris Stankevitz 
Alex Neundorf 
normalminoralways
closedfixed 
Eclipse CDT
CMake 2.8.9 
CMake 2.8.11 
0013596: Eclipse project: Set Source path to the source code directory
The Eclipse indexer by default indexes the entire project. This causes headaches as the cmake-generated projects include [Targets] and [Subprojects] which contain copies of all the source code.

In bug 13189 we discuss marking the [Targets] and [Subprojects] resources as "derived". Unfortunately the CDT indexer seems to disregard their "derived" nature and indexes them anyway. For more info on this apparent CDT bug see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=390964 [^] and http://www.eclipse.org/forums/index.php?t=rview&goto=948782 [^]

In addition to marking [Targets] and [Subprojects] resources as "derived", I recommend we also set the eclipse project "source path" to point to the [Source directory] resource. This causes CDT to limit its indexing to the [Source directory] resource. This solves the problems described in bug 13189.

See attached for an example of manually making this change.
No tags attached.
related to 0015347closed Alex Neundorf Eclipse indexing no longer works 
png Screenshot-Properties for uavlib-DEBUG@BuildDebug.png (53,619) 2012-10-18 17:36
https://public.kitware.com/Bug/file/4528/Screenshot-Properties%20for%20uavlib-DEBUG%40BuildDebug.png
png

cxx cmExtraEclipseCDT4Generator.cxx (46,681) 2012-10-23 16:44
https://public.kitware.com/Bug/file/4529/cmExtraEclipseCDT4Generator.cxx
Issue History
2012-10-18 17:36Chris StankevitzNew Issue
2012-10-18 17:36Chris StankevitzFile Added: Screenshot-Properties for uavlib-DEBUG@BuildDebug.png
2012-10-19 12:32Alex NeundorfNote Added: 0031284
2012-10-19 12:32Alex NeundorfAssigned To => Alex Neundorf
2012-10-19 12:32Alex NeundorfStatusnew => assigned
2012-10-23 16:43Alex NeundorfNote Added: 0031298
2012-10-23 16:44Alex NeundorfFile Added: cmExtraEclipseCDT4Generator.cxx
2012-10-23 18:49Chris StankevitzNote Added: 0031301
2012-10-24 09:15Alex NeundorfNote Added: 0031303
2012-10-24 14:53David ColeTarget Version => CMake 2.8.11
2012-11-03 13:57Alex NeundorfNote Added: 0031399
2012-11-03 13:57Alex NeundorfStatusassigned => closed
2012-11-03 13:57Alex NeundorfResolutionopen => fixed
2015-01-13 14:32Brad KingRelationship addedrelated to 0015347

Notes
(0031284)
Alex Neundorf   
2012-10-19 12:32   
This looks good, thanks for pointing me to it.
(0031298)
Alex Neundorf   
2012-10-23 16:43   
Can you try the EclipseFixIndexerBySettingSourcePath branch from cmake stage ?
http://cmake.org/gitweb?p=stage/cmake.git [^]

Alternatively you can also simply put the attached cmExtraEclipseCDT4Generator.cxx in a cmake 2.8.9 or 2.8.10 source tree and rebuild cmake.

Please let me know whether it works then for you as expected.
(0031301)
Chris Stankevitz   
2012-10-23 18:49   
Yes, it works on Eclipse 3.8 under linux. Thank you so much this has been driving me nuts!

PS: How do I make the branch from cmake stage build cmake-gui? It built only ccmake cmake cpack and ctest. If I can figure this out, I'm going to ditch my system install and use your branch until this fix gets released.
(0031303)
Alex Neundorf   
2012-10-24 09:15   
You have to set BUILD_QtDialog to TRUE, e.g. using ccmake.

Alex
(0031399)
Alex Neundorf   
2012-11-03 13:57   
Merged into next, should be in 2.8.11.