I don'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"><<a href="mailto:kubito@gmail.com">kubito@gmail.com</a>></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 <<a href="mailto:glenn.coombs@gmail.com">glenn.coombs@gmail.com</a>><br>
writes:<br>
<div class="im"><br>
> Is there a more elegant solution that I am missing ? Ideally something<br>
> like:<br>
><br>
> add_definitions(CONFIG=Debug;Release;RelWithDebInfo;MinSizeRel<br>
> -DGEN_OUTFILES)<br>
><br>
> which I know doesn't exist but I really wish it did :-)<br>
<br>
</div>Isn't it OK to just do something like:<br>
<br>
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseNoOutFiles")<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>