I don&#39;t think CMAKE_BUILD_TYPE is used by the Visual Studio generators so  that would only work for Makefile based build systems.  I need a solution that works for both Visual Studio on Windows and Makefiles on Linux.  <br>
<br><div class="gmail_quote">On 12 June 2011 21:32, Raphael Kubo da Costa <span dir="ltr">&lt;<a href="mailto:kubito@gmail.com">kubito@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Glenn Coombs &lt;<a href="mailto:glenn.coombs@gmail.com">glenn.coombs@gmail.com</a>&gt;<br>
writes:<br>
<div class="im"><br>
&gt; Is there a more elegant solution that I am missing ?  Ideally something<br>
&gt; like:<br>
&gt;<br>
&gt; add_definitions(CONFIG=Debug;Release;RelWithDebInfo;MinSizeRel<br>
&gt; -DGEN_OUTFILES)<br>
&gt;<br>
&gt; which I know doesn&#39;t exist but I really wish it did :-)<br>
<br>
</div>Isn&#39;t it OK to just do something like:<br>
<br>
  if (NOT &quot;${CMAKE_BUILD_TYPE}&quot; STREQUAL &quot;ReleaseNoOutFiles&quot;)<br>
    add_definitions(-DGEN_OUTFILES)<br>
  endif ()<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>