<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Configuration</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>Recent changes to Configuration</description><atom:link href="https://sourceforge.net/p/meson/wiki/Configuration/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 04 Sep 2014 07:57:55 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/meson/wiki/Configuration/feed" rel="self" type="application/rss+xml"/><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -1,3 +1,10 @@
+The Meson build system has moved
+==
+
+The new home of Meson's documentation is [here](https://github.com/jpakkane/meson/wiki). The information below is preserved only for posterity. It should be considered out of date.
+
+-------
+
 Configuration files

 If there are multiple configuration options, passing them through compiler flags becomes very burdensome. It also makes the configuration settings hard to inspect. To make things easier, Meson supports the generation of configure files. This feature is similar to one found in other build systems such as CMake.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 04 Sep 2014 07:57:55 -0000</pubDate><guid>https://sourceforge.netc52a93aa6502560fab0c16a70964503b5d49144a</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -16,7 +16,7 @@

     #define VERSION_STR "1.2.3"

-More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective values set in &lt;tt&gt;conf_data&lt;/tt&gt;. You can use a single &lt;tt&gt;configuration_data&lt;/tt&gt; object as many times as you like, but it becomes immutable after the first use. That is, after it has been used once, the &lt;tt&gt;set&lt;/tt&gt; function becomes unusable and trying to call it causes an error.
+More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective values set in &lt;tt&gt;conf_data&lt;/tt&gt;. You can use a single &lt;tt&gt;configuration_data&lt;/tt&gt; object as many times as you like, but it becomes immutable after the first use. That is, after it has been used once the &lt;tt&gt;set&lt;/tt&gt; function becomes unusable and trying to call it causes an error.

 For more complex configuration file generation Meson provides a second form. To use it, put a line like this in your configuration file.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Sun, 02 Jun 2013 22:23:55 -0000</pubDate><guid>https://sourceforge.netfe57b6ade4501403af3b930929f4112ed477cda9</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -29,7 +29,9 @@
     #define TOKEN 4   // If TOKEN is set to an integer or string value.
     /* undef TOKEN */ // If TOKEN has not been set to any value.

-Note that if you want to define a C string, you need to do the quoting yourself, like this &lt;tt&gt;conf.set(TOKEN, '"value"')&lt;/tt&gt;.
+Note that if you want to define a C string, you need to do the quoting yourself like this:
+
+    conf.set(TOKEN, '"value"')

 Often you have a boolean value in Meson but need to define the C/C++ token as 0 or 1. Meson provides a convenience function for this use case.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Sun, 02 Jun 2013 22:23:05 -0000</pubDate><guid>https://sourceforge.net007655196d3ac64472036c6d2685e9d84002eb2b</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -22,12 +22,14 @@

     #mesondefine TOKEN

-The replacement that happens depends on what the value of TOKEN is:
+The replacement that happens depends on what the value and type of TOKEN is:

     #define TOKEN     // If TOKEN is set to boolean true.
     #undef TOKEN      // If TOKEN is set to boolean false.
-    #define TOKEN 4   // If TOKEN is set to an integer value.
+    #define TOKEN 4   // If TOKEN is set to an integer or string value.
     /* undef TOKEN */ // If TOKEN has not been set to any value.
+
+Note that if you want to define a C string, you need to do the quoting yourself, like this &lt;tt&gt;conf.set(TOKEN, '"value"')&lt;/tt&gt;.

 Often you have a boolean value in Meson but need to define the C/C++ token as 0 or 1. Meson provides a convenience function for this use case.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Sun, 02 Jun 2013 21:07:27 -0000</pubDate><guid>https://sourceforge.netd1796930b3d6c77f6efba4f2a50e601dbe3d0a44</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -29,7 +29,7 @@
     #define TOKEN 4   // If TOKEN is set to an integer value.
     /* undef TOKEN */ // If TOKEN has not been set to any value.

-In several cases you have a boolean value in Meson but need to define the C/C++ token 0 or 1. Meson provides a convenience function.
+Often you have a boolean value in Meson but need to define the C/C++ token as 0 or 1. Meson provides a convenience function for this use case.

     conf.set10(token, boolean_value)
     # The line above is equivalent to this:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Sun, 02 Jun 2013 13:17:04 -0000</pubDate><guid>https://sourceforge.net3681bb35c18fce7abdbb161c167fd753f719de56</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -18,6 +18,27 @@

 More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective values set in &lt;tt&gt;conf_data&lt;/tt&gt;. You can use a single &lt;tt&gt;configuration_data&lt;/tt&gt; object as many times as you like, but it becomes immutable after the first use. That is, after it has been used once, the &lt;tt&gt;set&lt;/tt&gt; function becomes unusable and trying to call it causes an error.

+For more complex configuration file generation Meson provides a second form. To use it, put a line like this in your configuration file.
+
+    #mesondefine TOKEN
+
+The replacement that happens depends on what the value of TOKEN is:
+
+    #define TOKEN     // If TOKEN is set to boolean true.
+    #undef TOKEN      // If TOKEN is set to boolean false.
+    #define TOKEN 4   // If TOKEN is set to an integer value.
+    /* undef TOKEN */ // If TOKEN has not been set to any value.
+
+In several cases you have a boolean value in Meson but need to define the C/C++ token 0 or 1. Meson provides a convenience function.
+
+    conf.set10(token, boolean_value)
+    # The line above is equivalent to this:
+    if boolean_value
+      conf.set(token, 1)
+    else
+      conf.set(token, 0)
+    endif
+
 ---

 [Back to index](Manual).
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Sun, 02 Jun 2013 13:12:26 -0000</pubDate><guid>https://sourceforge.neta5fa907c07b9a1cae3f2d15c6b0ea53f519d6ee7</guid></item><item><title>Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -4,18 +4,19 @@

 Suppose we have the following Meson snippet:

-&lt;tt&gt;version = '1.2.3'
-configure_file('config.h.in', 'config.h')&lt;/tt&gt;
+    conf_data = configuration_data()
+    conf_data.set('version', '1.2.3')
+    configure_file(input : 'config.h.in', output : 'config.h', configuration : conf_data)

 and that the contents of &lt;tt&gt;config.h.in&lt;/tt&gt; are

-&lt;tt&gt;#define VERSION_STR "@version@"&lt;/tt&gt;
+    #define VERSION_STR "@version@"

 Meson will then create a file called &lt;tt&gt;config.h&lt;/tt&gt; in the corresponding build directory whose contents are the following.

-&lt;tt&gt;#define VERSION_STR "1.2.3"&lt;/tt&gt;
+    #define VERSION_STR "1.2.3"

-More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective variable values.
+More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective values set in &lt;tt&gt;conf_data&lt;/tt&gt;. You can use a single &lt;tt&gt;configuration_data&lt;/tt&gt; object as many times as you like, but it becomes immutable after the first use. That is, after it has been used once, the &lt;tt&gt;set&lt;/tt&gt; function becomes unusable and trying to call it causes an error.

 ---

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Fri, 24 May 2013 19:27:13 -0000</pubDate><guid>https://sourceforge.net2d27e806dd52ed0af42d015691625856e8f91b44</guid></item><item><title>WikiPage Configuration modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Configuration/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Configuration files&lt;/p&gt;
&lt;p&gt;If there are multiple configuration options, passing them through compiler flags becomes very burdensome. It also makes the configuration settings hard to inspect. To make things easier, Meson supports the generation of configure files. This feature is similar to one found in other build systems such as CMake.&lt;/p&gt;
&lt;p&gt;Suppose we have the following Meson snippet:&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;version = '1.2.3'&lt;br /&gt;
configure_file('config.h.in', 'config.h')&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;and that the contents of &lt;tt&gt;config.h.in&lt;/tt&gt; are&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;#define VERSION_STR "@version@"&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;Meson will then create a file called &lt;tt&gt;config.h&lt;/tt&gt; in the corresponding build directory whose contents are the following.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;#define VERSION_STR "1.2.3"&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;More specifically, Meson will find all strings of the type &lt;tt&gt;@varname@&lt;/tt&gt; and replace them with respective variable values.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a class="" href="/p/meson/wiki/Manual/"&gt;Back to index&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jussi Pakkanen</dc:creator><pubDate>Thu, 28 Feb 2013 22:49:06 -0000</pubDate><guid>https://sourceforge.net7e7fe1bb5ca2752f1ccddc1469664d85dc0fe6b2</guid></item></channel></rss>