<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 19.11.19 um 12:09 schrieb Stéphane
Ancelot:<br>
</div>
<blockquote type="cite"
cite="mid:a9b3c12a-e3df-3ea6-4b29-1dca5ebd3917@numalliance.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi,</p>
<p>I have a particular target (using swig / jni) that must not
have -O3 -NDEBUG flags from Relase build type</p>
<p>How can I overload this target flags ?</p>
</blockquote>
Since CMAKE_<lang>_FLAGS_RELEASE does not map to a
user-visible target property, you cannot override it directly
(anything added to the COMPILE_FLAGS property is appended to the
command line and does not replace any of the compiler flags CMake
sets by itself). However, you can redefine this variable before you
create your special target(s), and then restore it so that other
targets are not affected:<br>
<p>set(_CMAKE_CXX_FLAGS_RELEASE_SAVE ${CMAKE_CXX_FLAGS_RELEASE})<br>
set(CMAKE_CXX_FLAGS_RELEASE)<br>
< add your target(s) here ><br>
set(CMAKE_CXX_FLAGS_RELEASE ${_CMAKE_CXX_FLAGS_RELEASE_SAVE})<br>
</p>
<p>This assumes your target is C++; if it is C, simply replace the
_CXX_ with _C_.<br>
</p>
<p>-- </p>
<div class="moz-signature">
<div style="width:480px; text-align: left; font-family: Arial,
Helvetica, sans-serif;">
<p style="color: #062d64; font-size: 14px; text-align: left;
font-family: Arial, Helvetica, sans-serif;">
<b>Dr. Eric Dönges</b>
<br>
Senior Software Engineer
</p>
<p style="color: #062d64; font-size: 12px; text-align: left;
font-family: Arial, Helvetica, sans-serif;">MVTec Software
GmbH | Arnulfstr. 205 | 80634 Munich | Germany
<br>
<a style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;"
href="mailto:mustermann@mvtec.com">doenges@mvtec.com</a> |
Tel: +49 89 457 695-0 | <a style="font-size: 12px;
font-family: Arial, Helvetica, sans-serif; color: #062d64;"
href="http://www.mvtec.com">www.mvtec.com</a>
<br>
</p>
<p>
<span style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;">Find our privacy policy <a
style="font-size: 12px; font-family: Arial, Helvetica,
sans-serif; color: #062d64;"
href="https://www.mvtec.com/imprint">here</a>.</span> </p>
<p style="color: #062d64; font-size: 12px; text-align: left;
font-family: Arial, Helvetica, sans-serif;"><img
src="https://mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/newsletter-icon.png"
valign="bottom" width="16" height="16"> <a style="font-size:
12px; font-family: Arial, Helvetica, sans-serif; color:
#062d64; font-weight: bold;"
href="https://www.mvtec.com/newsletter">Sign up</a> for our
MVTec Newsletter!</p>
<p style="margin: 0px; color: #666; font-size: 12px; text-align:
left; font-family: Arial, Helvetica, sans-serif;">Geschäftsführer:
Dr. Wolfgang Eckstein, Dr. Olaf Munkelt<br>
Amtsgericht München HRB 114695</p>
<p style="margin: 0px; color: #666; font-size: 12px; text-align:
left; font-family: Arial, Helvetica, sans-serif;"> </p>
<img
src="https://www.mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/mvtec-logo-line.png"
alt="MVTec Software GmbH Logo"></div>
</div>
</body>
</html>