<div dir="ltr">On Mon, Aug 25, 2008 at 6:04 AM, Yuri V. Timenkov <span dir="ltr"><<a href="mailto:ytimenkov@parallels.com">ytimenkov@parallels.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Monday 25 August 2008 13:04:56 cyril_wobow wrote:<br>
> Hi again,<br>
><br>
> At the end of the present mail there is a dirty-but-simple patch for<br>
> cmComputeLinkDepends.cxx in the cmake sources.<br>
> It allows to have configuration types like "GuiDebug, GuiRelease,<br>
> ConsoleDebug, ConsoleRelease" and still have the two debug configs be<br>
> considered as debug (non-optimized) configs, thus link with the debug<br>
> version of 3rd-party libraries.<br>
><br>
> Wondering if this patch could go into cmake trunk, until a better<br>
> solution is found (like real build configuration semantics).<br>
</div>Usually, cmake developers suggest file issue into tracker and attach patch to<br>
it.<br>
<br>
I also thought about this simple solution. But, for example, we had stupid<br>
configuration name "ReleaseDebug" (It was release one but with debugging<br>
information and without any optimization).<br>
<br>
Other examples may include "profile", "coverage" or "maintainer" and one users<br>
may desire to use optimized libs for them, while others debug ones.<br>
<br>
The patch will not be much longer if you take into account extra list which<br>
contains names for optimized and debug configurations (You have Makefile<br>
reference with whole set of variables).<br>
<br>
Anyways, I think it is good functionality which CMake should have.</blockquote><div><br>Does LINK_INTERFACE_LIBRARIES_<CONFIG> do what you want to do?<br><br>See <a href="http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:LINK_INTERFACE_LIBRARIES">http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:LINK_INTERFACE_LIBRARIES</a> in conjunction with SET_PROPERTY command.<br>
<br><br>If that works, CMake still could use a way to correlate the "debug" or "optimized" target_link_libraries() directives with custom build configurations. Perhaps something as simple as.<br><br>cmake default:<br>
SET(CMAKE_DEBUG_CONFIGURATIONS Debug)<br>SET(CMAKE_OPTIMIZED_CONFIGURATIONS Release;MinSizeRel;RelWithDebInfo)<br>user code:<br>LIST(APPEND CMAKE_DEBUG_CONFIGURATIONS Profile Coverage Maintainer)<br>LIST(APPEND CMAKE_OPTIMIZED_CONFIGURATIONS SuperOptimized)<br>
</div></div><br>-- <br>Philip Lowman<br>
</div>