[CMake] question about COMPILE_DEFINITIONS_RELEASE

Kenneth Riddile kfriddile at yahoo.com
Wed Nov 18 11:40:45 EST 2009


Thanks, that works.  My first guess at how it should work was COMPILE_DEFINITIONS_OPTIMIZED.
--- On Wed, 11/18/09, Tyler Roscoe <tyler at cryptio.net> wrote:

From: Tyler Roscoe <tyler at cryptio.net>
Subject: Re: [CMake] question about COMPILE_DEFINITIONS_RELEASE
To: "Kenneth Riddile" <kfriddile at yahoo.com>
Cc: cmake at cmake.org
Date: Wednesday, November 18, 2009, 10:16 AM

On Wed, Nov 18, 2009 at 07:31:06AM -0800, Kenneth Riddile wrote:
> I'm using cmake to generate projects for Visual Studio 9.  I've
> noticed that when I use COMPILE_DEFINITIONS_RELEASE to add a
> preprocessor directive, it's only added to the "Release" configuration
> in the Visual Studio project, and not the "MinSizeRel" and
> "RelWithDebInfo" configurations.  How can I add a preprocessor
> directive for all three of these release configurations?

I think you need to add COMPILE_DEFINITIONS_MINSIZEREL etc. I would dosomething like:

foreach (configuration MINSIZEREL RELWITHDEBINFO MYCONFIG)
    ... COMPILE_DEFINITIONS_${configuration} "SomeDef" ...
endforeach ()

How would you expect it to work?

tyler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091118/b9c19ca0/attachment-0001.htm>


More information about the CMake mailing list