[CMake] eclipse generator and sibling folders
Eric Noulard
eric.noulard at gmail.com
Sun May 10 10:13:47 EDT 2009
2009/5/10 Eric Noulard <eric.noulard at gmail.com>:
> 2009/5/8 Eric Noulard <eric.noulard at gmail.com>:
>>> Ah, no problem. I was just thinking that there might be a bug. BTW,
>>> did you try the ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT option?
>>
>> Yes it wokrs just fine.
>>
>>> 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
>>
>> Yes that's right, that's just you have 2 project instead of one, but
>> I know it's currently the best you can do.
>
> Miguel,
>
> After some thought about 2 projects things with Eclipse CDT generator
> I would have a suggestion.
>
> When using ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT
> why do you generate 3 projects files.
>
> I.e. two in the build dir (.project a
continued...
two in the build dir: (for building debugging etc...)
.project --> with link ressource to source
.cproject
one in the source dir: (for source control).
.project
Why don't you generate the .project and .cproject directly
in the source tree?
I know that's bad but in the short term this is fine (at least for me).
You may generate the same file content but update:
<source_dir>/.project:
with the same content as the current <build_dir>/.project
however the BuildLocation should refer to the <build_dir>
<source_dir>/.cproject
is the same a before but you update the BuildTargets
with appropriate change dir (-C) option to make:
<buildArguments>-C build_dir </buildArguments>
I did it "by hand" and it seems to work fine.
It has the same drawback as the current
"ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT" option
i.e. putting files in the source dir, however you now have
only one project to import with "intuitive" source control
with Eclipse Team.
Do I miss something?
This should not change the behaviour of Eclipse CDT generator
when ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is not set.
--
Erk
More information about the CMake
mailing list