Eclipse CDT 4.0 + CMake (2.8.0)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Eclipse CDT 4.0 + CMake (2.8.0)

Peter Kluger
Hi to all,

 i recently start using eclipse in our project and am very happy how it
works with the CMake Eclipse CDT 4.0 generator.
Unfortunately, every time i recall cmake it writes the .project
(+.cproject) file for eclipse and overwrites my personal settings within
that file prior set,
like when i set extra make parameters (../gmake -j X -k).
It is kind of annoying since i have to call it every now and then and
must "reset" those settings.
I thought about writing my own script which is called after cmake and
retains those settings but i figured it could be something cmake does.
Maybe i overlooked a special flag i must set for cmake to keep certain
settings in the project file if it already exsists
but i haven't found anything related to my problem in the internetz. You
could discuss if its something, eclipse shouldnt store in the project file
to begin with, but i would like to have a "workaround". Any help would
be appreciated and thank you in advanced.

--
Mit freundlichen Grüßen / Kind regards,

Peter Kluger
_______________________________________________________________________
 
Kluger Peter
Development                        SIMPACK AG
 
Phone:  + 49 8105 77266-62         Friedrichshafener Strasse 1
Fax:    + 49 8105 77266-11         82205 Gilching, Germany
E-Mail: [hidden email]    [hidden email]
Web:    www.simpack.com

Simulation Software SIMPACK - Consulting - Training
_______________________________________________________________________

Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer;
Chair of Supervisory Board: Silvia Förster (CPA);
Commercial Register München HRB 181 229

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse CDT 4.0 + CMake (2.8.0)

Michael Jackson
You may want to try option #2 from the following page:

http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial

This would solve your problem as the .project and .cproject files are  
never actually generated. It is up to you to generate those files. But  
this means that you can customize the project in any way you would  
like and CMake will never mess with those files.

  I personally use this technique on a daily basis and it seems to  
work very well.

_________________________________________________________
Mike Jackson                  [hidden email]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Nov 24, 2009, at 10:00 AM, Peter Kluger wrote:

> Hi to all,
>
> i recently start using eclipse in our project and am very happy how  
> it works with the CMake Eclipse CDT 4.0 generator.
> Unfortunately, every time i recall cmake it writes the .project  
> (+.cproject) file for eclipse and overwrites my personal settings  
> within that file prior set,
> like when i set extra make parameters (../gmake -j X -k).
> It is kind of annoying since i have to call it every now and then  
> and must "reset" those settings.
> I thought about writing my own script which is called after cmake  
> and retains those settings but i figured it could be something cmake  
> does.
> Maybe i overlooked a special flag i must set for cmake to keep  
> certain settings in the project file if it already exsists
> but i haven't found anything related to my problem in the internetz.  
> You could discuss if its something, eclipse shouldnt store in the  
> project file
> to begin with, but i would like to have a "workaround". Any help  
> would be appreciated and thank you in advanced.
>
> --
> Mit freundlichen Grüßen / Kind regards,
>
> Peter Kluger
> _______________________________________________________________________
> Kluger Peter
> Development                        SIMPACK AG
> Phone:  + 49 8105 77266-62         Friedrichshafener Strasse 1
> Fax:    + 49 8105 77266-11         82205 Gilching, Germany
> E-Mail: [hidden email]    [hidden email]
> Web:    www.simpack.com
>
> Simulation Software SIMPACK - Consulting - Training  
> _______________________________________________________________________
>
> Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer; Chair of  
> Supervisory Board: Silvia Förster (CPA); Commercial Register München  
> HRB 181 229
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse CDT 4.0 + CMake (2.8.0)

Alexander Neundorf-3
In reply to this post by Peter Kluger
On Tuesday 24 November 2009, Peter Kluger wrote:
> Hi to all,
>
>  i recently start using eclipse in our project and am very happy how it
> works with the CMake Eclipse CDT 4.0 generator.
> Unfortunately, every time i recall cmake it writes the .project
> (+.cproject) file for eclipse and overwrites my personal settings within
> that file prior set,
> like when i set extra make parameters (../gmake -j X -k).

Please put this as a feature request in the bugtracker.

Alex
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse CDT 4.0 + CMake (2.8.0)

Michael Jackson
In reply to this post by Michael Jackson
The downside of Option #2 is that Eclipse will end up putting  
the .project and .cproject files in your source directory which some  
folks did not like, which is why they wrote the Eclise CDT generator.  
For me, Option #2 is worth the couple of downsides.

<disclaimer> I also wrote the Wiki entry for option #2 so I am partial  
to it.</disclaimer>

If you are using CMake with Eclipse you might want to have a look at <http://cmakeed.sourceforge.net 
 >. If you _do_ use CMakeEd, please do post feedback to the CMakeEd  
forums on Sourceforge letting us know if you find it useful or not.

<disclaimer-2>I helped write CMakeEd</disclaimer-2>
_________________________________________________________
Mike Jackson                  [hidden email]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Nov 25, 2009, at 4:14 AM, Peter Kluger wrote:

> Hi Mike,
> thanks for your fast reply! After setting everything according to  
> Option #2,
> further cmake calls wont overwrite my personal settings. I even added
> "A Make Target To Run CMake" which works fine as well!
>
> Thanks again, it solved my problem and you made my day :)
>
> Im sorry i didnt find the wiki-page on my own and had to bother,
> i just found the "Option #1 Eclipse CDT4 Generator <http://www.cmake.org/Wiki/Eclipse_CDT4_Generator 
> >" via google search.
> Next time i will use the wiki-page search!
>
> Kind regards,
> Peter Kluger
>
> Michael Jackson wrote:
>> You may want to try option #2 from the following page:
>>
>> http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial
>>
>> This would solve your problem as the .project and .cproject files are
>> never actually generated. It is up to you to generate those files.  
>> But
>> this means that you can customize the project in any way you would
>> like and CMake will never mess with those files.
>>
>>  I personally use this technique on a daily basis and it seems to
>> work very well.
>>
>> _________________________________________________________
>> Mike Jackson                  [hidden email]
>> BlueQuartz Software                    www.bluequartz.net
>> Principal Software Engineer                  Dayton, Ohio
>>
>> On Nov 24, 2009, at 10:00 AM, Peter Kluger wrote:
>>
>>
>>> Hi to all,
>>>
>>> i recently start using eclipse in our project and am very happy how
>>> it works with the CMake Eclipse CDT 4.0 generator.
>>> Unfortunately, every time i recall cmake it writes the .project
>>> (+.cproject) file for eclipse and overwrites my personal settings
>>> within that file prior set,
>>> like when i set extra make parameters (../gmake -j X -k).
>>> It is kind of annoying since i have to call it every now and then
>>> and must "reset" those settings.
>>> I thought about writing my own script which is called after cmake
>>> and retains those settings but i figured it could be something cmake
>>> does.
>>> Maybe i overlooked a special flag i must set for cmake to keep
>>> certain settings in the project file if it already exsists
>>> but i haven't found anything related to my problem in the internetz.
>>> You could discuss if its something, eclipse shouldnt store in the
>>> project file
>>> to begin with, but i would like to have a "workaround". Any help
>>> would be appreciated and thank you in advanced.
>>>
>>> --
>>> Mit freundlichen Grüßen / Kind regards,
>>>
>>> Peter Kluger
>>> _______________________________________________________________________
>>> Kluger Peter
>>> Development                        SIMPACK AG
>>> Phone:  + 49 8105 77266-62         Friedrichshafener Strasse 1
>>> Fax:    + 49 8105 77266-11         82205 Gilching, Germany
>>> E-Mail: [hidden email]    [hidden email]
>>> Web:    www.simpack.com
>>>
>>> Simulation Software SIMPACK - Consulting - Training
>>> _______________________________________________________________________
>>>
>>> Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer; Chair of
>>> Supervisory Board: Silvia Förster (CPA); Commercial Register München
>>> HRB 181 229
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>> .
>>
>>
>
>
> --
> Mit freundlichen Grüßen / Kind regards,
>
> Peter Kluger
> _______________________________________________________________________
> Kluger Peter
> Development                        SIMPACK AG
> Phone:  + 49 8105 77266-62         Friedrichshafener Strasse 1
> Fax:    + 49 8105 77266-11         82205 Gilching, Germany
> E-Mail: [hidden email]    [hidden email]
> Web:    www.simpack.com
>
> Simulation Software SIMPACK - Consulting - Training  
> _______________________________________________________________________
>
> Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer; Chair of  
> Supervisory Board: Silvia Förster (CPA); Commercial Register München  
> HRB 181 229

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse CDT 4.0 + CMake (2.8.0)

Alexander Neundorf-3
On Wednesday 25 November 2009, Michael Jackson wrote:
> The downside of Option #2 is that Eclipse will end up putting
> the .project and .cproject files in your source directory which some
> folks did not like, which is why they wrote the Eclise CDT generator.

"Some folks" being the cmake developers.
The problem is that when a project generator does that, it is not possible
anymore to have multiple buildtrees for one source tree. So this is indeed
something ugly. But the reason is that _eclipse_ does not work properly if
the project files are not in the source directory somehow.

> For me, Option #2 is worth the couple of downsides.
>
> <disclaimer> I also wrote the Wiki entry for option #2 so I am partial
> to it.</disclaimer>

In cmake 2.8.0 the support for eclipse has improved compared to 2.6.x. Now
eclipse knows all the include dirs and builtin macros so completion should
work better.
Also It now nicely fills in all the available targets provided by the
makefiles into the targets tab of Eclipse.
And probably more which I can't remember right now.

> If you are using CMake with Eclipse you might want to have a look at
> <http://cmakeed.sourceforge.net
>
>  >. If you _do_ use CMakeEd, please do post feedback to the CMakeEd
>
> forums on Sourceforge letting us know if you find it useful or not.

We use it, it's nice :-)

Alex
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake