[CMake] Eclipse .cproject Preprocessor Macro Definitions

Ette, Anthony (CDS) Anthony.R.Ette at controlsdata.com
Thu May 28 15:17:08 EDT 2015


To Whom It May Concern:

I'm using Cmake 3.2.2, specifically the "Eclipse CDT4 - NMake Makefiles" generator.  I am able to successfully run cmake and build from within Eclipse but there seem to be things missing from the .cproject file.  For example, I've got a source routine with #ifdef _WIN32 and this chunk of code is greyed out (i.e. not perceived active) in the Eclipse editor and source outline views (see picture below).  I find this surprising since the build succeeds (it's ultimately able to find the necessary windows headers) and /DWIN32 is defined in CMAKE_CXX_FLAGS.

[cid:image001.png at 01D09958.9F78F2E0]

Can you explain why the Eclipse project is unaware of the toolchain preprocessor macros and elaborate on how I can control this behavior using cmake (i.e. what knobs do I have at my disposal to tweak the .cproject file that gets generated by the Cmake generator, if any)?

Thank you for your time and support,
Anthony Ette
Systems Engineer
Simulation and Modeling

Controls and Data Services Inc.
Part of the Rolls-Royce Group
7661 N Perimeter Rd
Indianapolis, IN 46241

tel: +1 (317) 230-6943
mob: +1 (317) 864-7975
email: Anthony.R.Ette at controlsdata.com<mailto:Anthony.R.Ette at controlsdata.com>
www.controlsdata.com<http://www.controlsdata.com/>

This e-mail (including attachments) contains contents owned by Rolls-Royce plc and its subsidiaries, affiliated companies or customers and covered by the laws of England and Wales, Brazil, US, or Canada (federal, state or provincial). The information contained in this email is intended to be confidential, may be legally privileged and subject to export controls which may restrict the access to and transfer of the information. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, interception or copying of this communication is strictly prohibited and may subject you to further legal action. Reply to the sender if you received this email by accident, and then delete the email and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150528/fa0c6d49/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 12675 bytes
Desc: image001.png
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150528/fa0c6d49/attachment-0001.png>


More information about the CMake mailing list