<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div>Thanks, that works. &nbsp;My first guess at how it should work was&nbsp;COMPILE_DEFINITIONS_OPTIMIZED.</div><div><br></div>--- On <b>Wed, 11/18/09, Tyler Roscoe <i>&lt;tyler@cryptio.net&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Tyler Roscoe &lt;tyler@cryptio.net&gt;<br>Subject: Re: [CMake] question about COMPILE_DEFINITIONS_RELEASE<br>To: "Kenneth Riddile" &lt;kfriddile@yahoo.com&gt;<br>Cc: cmake@cmake.org<br>Date: Wednesday, November 18, 2009, 10:16 AM<br><br><div class="plainMail">On Wed, Nov 18, 2009 at 07:31:06AM -0800, Kenneth Riddile wrote:<br>&gt; I'm using cmake to generate projects for Visual Studio 9. &nbsp;I've<br>&gt; noticed that when I use&nbsp;COMPILE_DEFINITIONS_RELEASE to add a<br>&gt; preprocessor directive, it's only added to the "Release"
 configuration<br>&gt; in the Visual Studio project, and not the "MinSizeRel" and<br>&gt; "RelWithDebInfo" configurations.&nbsp; How can I add a preprocessor<br>&gt; directive for all three of these release configurations?<br><br>I think you need to add COMPILE_DEFINITIONS_MINSIZEREL etc.&nbsp;I would do</div><div class="plainMail">something like:<br><br>foreach (configuration MINSIZEREL RELWITHDEBINFO MYCONFIG)<br>&nbsp; &nbsp; ... COMPILE_DEFINITIONS_${configuration} "SomeDef" ...<br>endforeach ()<br><br>How would you expect it to work?<br><br>tyler</div></blockquote></td></tr></table>