<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Hi Christian Adam,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Thanks for pointing this out, I made the necessary changes to account for this.<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
So the behavior is as follows:<br>
</div>
<ul>
<li>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
If no CMAKE_BUILD_TYPE is set and no CFLAGS are set it will default to Release. i.e ( cmake .. )</div>
</li><li>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
If a developer want full control then use export CFLAGS in leave CMAKE_BUILD_TYPE empty.<br>
</div>
</li><li>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
If a developer want to test CFLAGS in combination with CMAKE_BUILD_TYPE one has to specify CMAKE_BUILD_TYPE and export the CFLAGS</div>
</li></ul>
<div><a id="LPlnk325254" href="https://github.com/xiph/opus/pull/118">https://github.com/xiph/opus/pull/118</a><br>
</div>
<div class="LPBorder554119" id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL3hpcGgvb3B1cy9wdWxsLzExOA.." style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; min-width: 424px; max-width: 800px;" contenteditable="false">
<table id="LPContainer554119" role="presentation" style="padding: 12px 36px 12px 12px; border-radius: 2px; border: 1px solid rgb(200, 200, 200); width: 100%;">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td>
<div id="LPImageContainer554119" style="height: 160px; overflow: hidden; margin-right: 12px; position: relative;">
<a id="LPImageAnchor554119" href="https://github.com/xiph/opus/pull/118" target="_blank"><img width="160" height="160" id="LPThumbnailImageId554119" style="display: block;" alt="" src="https://avatars0.githubusercontent.com/u/8365509?s=400&v=4"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle554119" style="font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 21px; font-weight: 300; margin-right: 8px; margin-bottom: 12px;">
<a id="LPUrlAnchor554119" style="color: var(--themePrimary); text-decoration: none;" href="https://github.com/xiph/opus/pull/118" target="_blank">CMake - If CMAKE_BUILD_TYPE is empty and CFlags are set then only use… by xnorpx · Pull Request #118 · xiph/opus</a></div>
<div id="LPDescription554119" style="color: rgb(102, 102, 102); overflow: hidden; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; margin-right: 8px; margin-bottom: 12px; max-height: 100px;">
CMake - If CMAKE_BUILD_TYPE is empty and CFlags are set then only use CFlags. If None are set then use CMAKE_BUILD_TYPE by Release by default.</div>
<div id="LPMetadata554119" style="color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; font-weight: 400;">
github.com</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
//Marcus</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Cristian Adam <cristian.adam@gmail.com><br>
<b>Sent:</b> Thursday, April 11, 2019 00:30<br>
<b>To:</b> Marcus Asteborg<br>
<b>Cc:</b> Mark Harris; opus@xiph.org<br>
<b>Subject:</b> Re: [opus] Opus cmake build</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">On Wed, Apr 10, 2019 at 5:30 PM Marcus Asteborg <<a href="mailto:xnorpx@outlook.com">xnorpx@outlook.com</a>> wrote:<br>
</div>
<div class="x_gmail_quote">
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span>Hi Mark,</span></div>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
Thanks for the feedback.</div>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
By default CMake is building the static library in debug, to get other things one has to explicit turn it on.<br>
</div>
<div style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Hi,</div>
<div><br>
</div>
<div>By default CMake uses the "empty" build, which is used in combination with the environment variables CFLAGS and CXXFLAGS. </div>
<div><br>
</div>
<div>This build type is targeted at Linux distributions which want to use the same compiler flags for multiple packages.</div>
<div><br>
</div>
<div>If you want to change the default build type to something else when CMAKE_BUILD_TYPE is empty, make sure that you do that when $ENV{CFLAGS} and $ENV{CXXFLAGS} are not set.</div>
<div><br>
</div>
<div>There is a blog entry at Kitware <a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.kitware.com%2Fcmake-and-the-default-build-type%2F&data=02%7C01%7C%7C0fdff823fe65421696db08d6be4f8a76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636905646161553123&sdata=dcGdrZYlPvnZ1x9Rgvj8%2BxbKkEn1HP9xOCnoMYlqIco%3D&reserved=0" originalsrc="https://blog.kitware.com/cmake-and-the-default-build-type/" shash="lRzjQbxdnq3cQCPtGqeYvsEvSDajqbg9xs6SsPL2Vq9CckaZDCWk1Uob/s3U9dmbJtJweLSpjYmZhDbYHjVNVTiLd62cgJOv1/NN42wwrPRDswYmXekuHDDHaL+VAUnXrlHJVWKZid0LabaMNeDb6pkUpeLNlRHoW7BfZaE+VtM=">https://blog.kitware.com/cmake-and-the-default-build-type/</a>
 on this topic. Unfortunately it doesn't address the  CFLAGS, CXXFLAGS issue. I guess one can combine the both and have an optimal solution.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Cristian.</div>
<div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>