<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Warning &amp;quot;The CMake build type was set to &amp;#39;MinSizeRel&amp;#39;, but the optimization flag was set to &amp;#39;-Og&amp;#39;.&amp;quot; when debug options are set</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119563/warning-the-cmake-build-type-was-set-to-minsizerel-but-the-optimization-flag-was-set-to--og-when-debug-options-are-set</link><description>When I compile the attached example project like this: 
 
 I get the following warning: 
 
 And the compile flags for main.c (taken from compile_commands.json) are: 
 
 I don&amp;#39;t understand where and why the CMAKE_BUILD_TYPE option gets set to MinSizeRel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Mar 2025 09:12:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119563/warning-the-cmake-build-type-was-set-to-minsizerel-but-the-optimization-flag-was-set-to--og-when-debug-options-are-set" /><item><title>RE: Warning "The CMake build type was set to 'MinSizeRel', but the optimization flag was set to '-Og'." when debug options are set</title><link>https://devzone.nordicsemi.com/thread/526501?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 09:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0562d4f-246d-472e-9268-3c9d21ee8e4d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It was fixed by this commit:&amp;nbsp;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/79597/commits/3bead0e2ceaff1db4307cba9575aa1ffa877e685"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/79597/commits/3bead0e2ceaff1db4307cba9575aa1ffa877e685&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;I verified&amp;nbsp;that I did not get the warning when using this revision of picolib in in SDK v.2.9.0.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/v2.9.0/modules/lib/picolibc$ git checkout d492d5fa7c96918e37653f303028346bb0dd51a2&lt;/pre&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Warning "The CMake build type was set to 'MinSizeRel', but the optimization flag was set to '-Og'." when debug options are set</title><link>https://devzone.nordicsemi.com/thread/526498?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 09:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34b8ee5a-2ad0-4fec-ae3f-a246f25a1716</guid><dc:creator>martin_nl</dc:creator><description>&lt;p&gt;If this is fixed in v3.0.0 then I think this won&amp;#39;t be a problem for us. We&amp;#39;re still early in the development so I would tend to follow the latest releases until we&amp;#39;re further in the development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Warning "The CMake build type was set to 'MinSizeRel', but the optimization flag was set to '-Og'." when debug options are set</title><link>https://devzone.nordicsemi.com/thread/526490?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 08:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e7f3d3-0cf6-430b-b9a1-121b5123e8de</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Thanks for reporting this. I&amp;#39;m able to reproduce the warning if I use SDK v2.8.0 or v2.9.0, but not v2.7.0 or the v3.0.0-preview tag.&amp;nbsp; I&amp;#39;m currently checking internally if this is a known issue. Will update this thread as soon as I know more.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>