<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Profiles</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>Recent changes to Profiles</description><atom:link href="https://sourceforge.net/p/mkconf/wiki/Profiles/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 13 Jul 2026 12:14:24 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mkconf/wiki/Profiles/feed" rel="self" type="application/rss+xml"/><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -15,8 +15,26 @@
     }

     profile debug {

-      add_compiler_flag '-g';
+      add_compiler_flag '-O0';
     }
+
+One issue is when a flag, such as the optimization level used above should not be duplicated. e.g.
+
+    add_compiler_flag '-O2';  # default
+    profile debug {
+      add_compiler_flag '-O0';
+    }
+
+would end up adding both `-O2` and `-O0` to the command line.  Instead the default profile must be explicitly named in this case.
+
+    profile default {
+      add_compiler_flag '-O2';
+    }
+    profile debug {
+      add_compiler_flag '-O0';
+    }
+
+Now, the `-O2` flag is only added if no profile is selected.

 A check or variable may be made compiler specific by using the [compiler](SyntaxAttrCompiler) attribute.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Mon, 13 Jul 2026 12:14:24 -0000</pubDate><guid>https://sourceforge.net6b84b68f916706445011508dbb4f67e5c1dc16a3</guid></item><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Fri, 03 Jul 2026 14:08:52 -0000</pubDate><guid>https://sourceforge.net3313ddf8bff71a165af2c66c71b68f208b447292</guid></item><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -6,12 +6,16 @@

 ##### Working with Profiles

-The current working profile is selected on the command line, and all checks that are not within a profile statement will go into the currently selected profile.
+The current working profile is selected on the command line, and all checks that are not within a profile statement will be attached to the currently selected profile.

 The profile statement should only be used when a check should only be in a particular profile. e.g.

     profile optimized {
       add_compiler_flag '-O3';

+    }
+
+    profile debug {
+      add_compiler_flag '-g';
     }

 A check or variable may be made compiler specific by using the [compiler](SyntaxAttrCompiler) attribute.
@@ -27,6 +31,7 @@

     project {
       name test;

+      compiler c;
     }

     # int64_t appears within the currently selected profile
@@ -45,8 +50,6 @@
       method auto;
     }

-command line:
-
 Note the default profile.

     $ mkc --profile debug test.mkc
@@ -62,8 +65,6 @@
     #define _size_int64_t 8
     #define _size_int8_t 1
     ...
-
-command line:

 Note the default profile.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Fri, 03 Jul 2026 14:03:49 -0000</pubDate><guid>https://sourceforge.net676fd1eec2568a500474c97809d26b9ec10192ef</guid></item><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -67,8 +67,8 @@

 Note the default profile.


-    $ mkc test.mkc
-    -- default profile: default general
+    $ mkc --profile release test.mkc
+    -- default profile: release general
     ...
     -- check size: int64_t : 8
     -- check size: int32_t : 4
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Mon, 29 Jun 2026 15:48:55 -0000</pubDate><guid>https://sourceforge.netdd45fd1a420aa6e6e03c1bdca1d62f4731a175f7</guid></item><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Sun, 28 Jun 2026 15:21:44 -0000</pubDate><guid>https://sourceforge.neta957e19ca3b8ab1032e6fa071d2c608e365cc209</guid></item><item><title>Profiles modified by Brad Lanam</title><link>https://sourceforge.net/p/mkconf/wiki/Profiles/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a href="/p/mkconf/wiki/Home/"&gt;Wiki Home&lt;/a&gt;&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#h-profiles"&gt;Profiles&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#h-working-with-profiles"&gt;Working with Profiles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#h-example"&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h3 id="h-profiles"&gt;Profiles&lt;/h3&gt;
&lt;h5 id="h-working-with-profiles"&gt;Working with Profiles&lt;/h5&gt;
&lt;p&gt;The current working profile is selected on the command line, and all checks that are not within a profile statement will go into the currently selected profile.&lt;/p&gt;
&lt;p&gt;The profile statement should only be used when a check should only be in a particular profile. e.g.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;profile optimized {
  add_compiler_flag '-O3';
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A check or variable may be made compiler specific by using the &lt;a href="./SyntaxAttrCompiler"&gt;compiler&lt;/a&gt; attribute.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;profile optimized {
  compiler c;
  add_compiler_flag '-O3';
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h5 id="h-example"&gt;Example&lt;/h5&gt;
&lt;p&gt;test.mkc:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;project {
  name test;
}

&lt;span class="gh"&gt;#&lt;/span&gt; int64_t appears within the currently selected profile
check_size int64_t { header stdint.h; }

profile debug {
  # _size_int8_t only appears for the debug profile.
  check_size int8_t { header stdint.h; }
}
profile release {
  # _size_int32_t only appears for the release profile.
  check_size int32_t { header stdint.h; }
}

configure {
  method auto;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;command line:&lt;/p&gt;
&lt;p&gt;Note the default profile.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;mkc&lt;span class="w"&gt; &lt;/span&gt;--profile&lt;span class="w"&gt; &lt;/span&gt;debug&lt;span class="w"&gt; &lt;/span&gt;test.mkc
--&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;profile:&lt;span class="w"&gt; &lt;/span&gt;debug&lt;span class="w"&gt; &lt;/span&gt;general
...
--&lt;span class="w"&gt; &lt;/span&gt;check&lt;span class="w"&gt; &lt;/span&gt;size:&lt;span class="w"&gt; &lt;/span&gt;int64_t&lt;span class="w"&gt; &lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;
--&lt;span class="w"&gt; &lt;/span&gt;check&lt;span class="w"&gt; &lt;/span&gt;size:&lt;span class="w"&gt; &lt;/span&gt;int8_t&lt;span class="w"&gt; &lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;test_config.h:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;...
&lt;span class="gh"&gt;#&lt;/span&gt;define _size_int64_t 8
&lt;span class="gh"&gt;#&lt;/span&gt;define _size_int8_t 1
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;command line:&lt;/p&gt;
&lt;p&gt;Note the default profile.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;mkc&lt;span class="w"&gt; &lt;/span&gt;test.mkc
--&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;profile:&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;general
...
--&lt;span class="w"&gt; &lt;/span&gt;check&lt;span class="w"&gt; &lt;/span&gt;size:&lt;span class="w"&gt; &lt;/span&gt;int64_t&lt;span class="w"&gt; &lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;
--&lt;span class="w"&gt; &lt;/span&gt;check&lt;span class="w"&gt; &lt;/span&gt;size:&lt;span class="w"&gt; &lt;/span&gt;int32_t&lt;span class="w"&gt; &lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;test_config.h:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;...
&lt;span class="gh"&gt;#&lt;/span&gt;define _size_int32_t 4
&lt;span class="gh"&gt;#&lt;/span&gt;define _size_int64_t 8
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="/p/mkconf/wiki/Home/"&gt;Wiki Home&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad Lanam</dc:creator><pubDate>Sun, 28 Jun 2026 15:17:00 -0000</pubDate><guid>https://sourceforge.netbdf3885716d9771a33c0c3fcf1d5b0fb393f98d8</guid></item></channel></rss>