[CMake] eclipse generator and sibling folders

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Mon May 4 16:55:32 EDT 2009


On Mon, May 4, 2009 at 2:46 PM, Eric Noulard wrote:
> 2009/5/4 Miguel A. Figueroa-Villanueva <miguelf at ieee.org>:
>> On Mon, May 4, 2009 at 4:36 AM, Eric Noulard wrote:
>>> 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.
>>
>> Eric,
>>
>> Why do you need to do this. There was a problem with standard system
>> includes (which should be fixed in the latest cmake version), but
>> includes that you add with the cmake include_directories command
>> should be picked up by the generator. The generator produces a set of
>> pathentry lines such as:
>>
>> <pathentry include="<path>" kind="inc" path="" system="true" />
>>
>> Is this not working for you?
>
> Sorry about that,  in fact it works for me. I'm just not using CMake
> Eclipse generator for
> project that use CVS because the "link ressource" trick does not
> enable me to user Team operation
> on the source.
>
> Eclipse CDT generator is working just fine for me regarding
> "include_directories command"
> including code completion.
>
> I did just gave a "generic" Eclipse CDT advice
>  which does not fits the Eclipse CDT generator case
> (but my "hand-made" Eclipse project with CMake which enables to use CVS)
> again sorry about the confusion.
>
> --
> Erk

Ah, no problem. I was just thinking that there might be a bug. BTW,
did you try the ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT option? It is no
the nicest solution, but it works around the problem of the
out-of-source builds with CVS sources. It is described here:

http://www.cmake.org/Wiki/Eclipse_CDT4_Generator

Hope that helps,
--Miguel


More information about the CMake mailing list