c++eclipsecilk

How to make eclipse error parser accept cilk_for


I am trying to make eclipse work with cilk. I want to define a macro as cilk_for = for for the eclipse CDT parser. Someone in another post recommended that I go to Project=>Properties=>Paths and Symbols and then define the symbol there so that only eclipse but not gcc will define the symbol. The problem is that gcc does see the symbol which disables cilk. How can I define this so only the eclipse parser has it.


Solution

  • Instead of adding the symbol to the "Paths and Symbols" option try adding it under "Preprocessor Include Paths, Macros, etc." (it's the one right below "Paths and Symbols"). On that page you select GNU C or GNU C++, select CDT User Setting Entries and click Add. In the dropdown select Preprocessor Macro. The other page is probably being pulled into your managed build, but this page shouldn't be.