MantisBT - CMake
View Issue Details
0005819CMakeCMakepublic2007-10-02 16:202008-02-21 14:21
Philip Lowman 
Miguel Figueroa 
normalfeaturealways
closedfixed 
 
 
0005819: Eclipse CDT4 Generator does not detect preprocessor definitions in use during compilation
When using Eclipse with a custom makefile project (generated by CMake) it scans preprocessor definitions defined at the command line during compilation and uses them to grey out sections of the code not currently being compiled due to definitions.

For some reason the CDT4 Generator does not do this. All #ifdef parts of the code are greyed out and the autodetection of what variables are being defined and their values is not occuring. This causes problems when trying to do certain things in the grey section like look up definitions.

The following patch fixes the behavior by scanning all of the Makefile's for all preprocessor definitions and tells Eclipse to automatically pick them up from the command line when source files are compiled.

This is a beta patch that hasn't been extensively tested.
No tags attached.
diff cmake_eclipse_definitions.diff (3,760) 2007-10-02 16:21
https://public.kitware.com/Bug/file/1163/cmake_eclipse_definitions.diff
Issue History
2007-10-02 16:20Philip LowmanNew Issue
2007-10-02 16:21Philip LowmanFile Added: cmake_eclipse_definitions.diff
2007-10-02 19:11Miguel FigueroaStatusnew => assigned
2007-10-02 19:11Miguel FigueroaAssigned To => Miguel Figueroa
2007-10-23 03:38Alex NeundorfNote Added: 0009529
2008-02-21 14:21Alex NeundorfNote Added: 0010621
2008-02-21 14:21Alex NeundorfStatusassigned => closed
2008-02-21 14:21Alex NeundorfResolutionopen => fixed

Notes
(0009529)
Alex Neundorf   
2007-10-23 03:38   
I think the patch looks good so far (I didn't test it).
It wouldn't hurt to put the added code in a separate method, so the mthods don't get too long.

Alex
(0010621)
Alex Neundorf   
2008-02-21 14:21   
I committed the patch from Miguel two days ago or so.
Please test that current cvs works for you, if it doesn't feel free to reopen this bug report.

Alex