<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Put an:<br><br>if(CMAKE_BUILD_TYPE STREQUAL "Debug")<br>endif()<br><br>guard around the set_property call.<br><br>Tim<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Robert Dailey" <rcdailey.lists@gmail.com><br><b>To: </b>"CMake ML" <cmake@cmake.org><br><b>Sent: </b>Friday, May 4, 2012 4:16:47 PM<br><b>Subject: </b>[CMake] Setting COMPILE_FLAGS property on a target in only debug?<br><br>I'm doing the following:<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>set_property( TARGET ${target_name} APPEND_STRING PROPERTY</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>COMPILE_FLAGS "/ZI /Gy "</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>)</div></div><div><br></div><div>However this applies to all configurations. I want to only set this compiler flag for debug builds, not release. How can I do this?</div>
<br>--<br><br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.cmake.org/mailman/listinfo/cmake</div><br></div></body></html>