[CMake] eclipse generator and code completion

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Mon May 4 08:24:12 EDT 2009


On Mon, May 4, 2009 at 6:01 AM, Eric Noulard wrote:
> 2009/5/4 Antoine DUCHAMPS:
>> Le lundi 04 mai 2009 à 10:36 +0200, Eric Noulard a écrit :
>>> 2009/5/4 Antoine DUCHAMPS:
>>> >
>>> > However, the code completion does not work. My application is linked to
>>> > an external library (ITK) and I would like to have code completion for
>>> > the ITK classes. In kdevelop you have to import the folders containing
>>> > the .h files. Do you know how it works in eclipse?
>>>
>>> You have to add the folder containing the .h files in the list of
>>> "includes" for the project.
>>> Use
>>>
>>> Properties on the Project
>>>    --> C/C++ General
>>>          --> Path and Symbols
>>>               --> C++
>>>
>>> works for me, "most of the time", I say most of the time since I do have
>>> some C++ header bloated with macros for which completion does not work at all.
>>>
>>
>> Hi Eric,
>>
>> It doesn't work for me. I'm not sure if we are doing the same ... In my
>> eclipse version I indicated the include folder by doing
>>
>> Project -> Properties -> C++ include paths and symbols -> Add External
>> Include Path ...
>
> I have no "C++ include paths and symbols" .
> Here comes a screenshot.
> Note however I'll suggest we drop CMake ML on the next e-mail since the problem
> is not really related to CMake.

Eric, maybe I'm missing something in your use case, but if you think
that the eclipse generator should automatically handle this, then it
is relevant here.

If not, then please explain why this is a specific issue for your use
case that shouldn't be handled generally.

> Whatever your eclipse/CDT version
> you may need to force "Rebuild index" after that:
>
> Contextual Right Click on the Project
>
>     Index ---> Rebuild.

If this (the Rebuild) solves Antoine's problem, then it seems to me
that would solve it from an IDE stand-point, but the generator should
include this automatically (see my other reply to this thread).

Thanks,
--Miguel


More information about the CMake mailing list