Am Donnerstag, 28. Mai 2015, 19:17:08 schrieb Ette, Anthony:
> 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.

This may be more related to CDt than to cmake, since cmake just generates the 
makefiles and the Eclipse project files.

Your code is displayed as greyed out, since CDT does not know about the _WIN32 
macro (but the build does know). You may manually add it in the project 
settings, or enable the GCC build output parser plus the gcc builtin specs 
detector to tell CDT about the macro.
The build output parser will find macros and include paths in the gcc command 
lines and add them automatically. Of course, this will not work, if the cmake 
generated build script passes the compiler options in a file:(

Advertising: Give the cmake4eclips plugin a try (which I am the author of)

Martin

-- 
Cd wrttn wtht vwls s mch trsr.


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to