[CMake] cmake, eclipse cdt, and intellisense

Dan Kegel dank at kegel.com
Thu Dec 15 13:57:11 EST 2011


It seems that cmake-2.8.4's generator for eclipse falls short
when it comes to intellisense (er, content assist).
While functions that are defined in the same source file are
handled ok, functions in other files don't seem to be.

Here's a simple example:

$ svn co http://winezeug.googlecode.com/svn/trunk/ winezeug
$ cd winezeug/cmake_examples/ex7
$ sh demo.sh
$ ~/eclipse/eclipse
Do "File / Import / General / Existing Projects", navigate to
~/winezeug/cmake_examples/ex7, and click OK and Finish
Do "Project / Build All"
In Project Explorer, open _demo/mymain.c
In mymain.c, right click on the call to my_function() and select Open
Declaration

Eclipse then complains "Could not find include file 'mylib.h' on include paths"

I've poked around a bit in eclipse's settings to see if I can force it
to index everything in the workspace, but haven't found a workaround yet.
Any suggestions?

Thanks,
Dan


More information about the CMake mailing list