<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I think you are fighting the tool in any case, because you are
asking to build multiple configurations in one build folder (?).
Normally you would create one build folder per configuration.. Which
I guess is what you are doing today.<br>
<br>
Instead of specifying the compile flags manually you can instead use
the variables ${CMAKE_C_FLAGS_RELEASE} and ${CMAKE_C_FLAGS_DEBUG},<br>
and you could set it so it only builds the second target based on an
option:<br>
<br>
option(BUILD_BOTH_LIBVERSIONS "Build both debug and optimized
library" OFF)<br>
<br>
if(BUILD_BOTH_LIBVERSIONS)<br>
add_library(...)<br>
set_target_properties(...)<br>
set_target_properties(...)<br>
install(...)<br>
endif()<br>
<br>
Cheers,<br>
Yngve<br>
<br>
<div class="moz-cite-prefix">On 02/07/2013 07:26 PM, Patrick
Johnmeyer wrote:<br>
</div>
<blockquote
cite="mid:CAMM1b9QaTOMJj_BSeM=RfmYpZ2RNVoKNZJhdnz_V-GYP5xO2RA@mail.gmail.com"
type="cite">
<div dir="ltr">On Thu, Feb 7, 2013 at 3:12 AM, Yngve Inntjore
Levinsen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:yngve.levinsen@gmail.com" target="_blank">yngve.levinsen@gmail.com</a>></span>
wrote:</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Did you try to create
two targets and add per-target compile flags?<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">What
you suggest is replacing configurations with targets. That
may be</span><br
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">possible,
but runs counter to how CMake natively works. I feel like
I</span><br
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">would
be fighting the tool to do it this way.</span></div>
<div><br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>