[Cmake] How to remove a #define?

Mathews, Rob rmathews at envoyww . com
Tue, 23 Sep 2003 13:39:39 -0400


I tried it. It seems to work, although it would probably be a cleaner
.vcproj file if the generator for .NET understood that "-U" natively.

At least, a trivial example line: 

ADD_DEFINITIONS("-DFOO")
ADD_DEFINITIONS("-UFOO")
ADD_EXECUTABLE(test_cmake  test.cpp)

does result in FOO being undefined while compiling test.cpp.

Rob.

> -----Original Message-----
> From: Brad King [mailto:brad . king at kitware . com]
> Sent: Tuesday, September 23, 2003 10:14 AM
> To: Mathews, Rob
> Cc: 'Karr, David'; Andy Cedilnik; cmake at www . cmake . org
> Subject: Re: [Cmake] How to remove a #define?
> 
> 
> 
> > ADD_DEFINITIONS - Add -D define flags to command line for 
> environments.
> > Usage: ADD_DEFINITIONS(-DFOO -DBAR ...) Add -D define flags 
> to command
> > line for environments.
> 
> You can try this, but I haven't tested it:
> 
> ADD_DEFINITIONS(-UFOO -UBAR)
> 
> -Brad
>