<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Adding flags</title><link>https://sourceforge.net/p/meson/wiki/Adding%2520flags/</link><description>Recent changes to Adding flags</description><atom:link href="https://sourceforge.net/p/meson/wiki/Adding%20flags/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 04 Sep 2014 07:57:38 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/meson/wiki/Adding%20flags/feed" rel="self" type="application/rss+xml"/><item><title>Adding flags modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Adding%2520flags/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -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.
+
+-------
+
 Adding compiler flags
 ==

&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:38 -0000</pubDate><guid>https://sourceforge.net695944fd2c642b8a4c1a79cc4dd0622286954777</guid></item><item><title>Adding flags modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Adding%2520flags/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -21,7 +21,7 @@

 Per target flags are just as simple to define.

-    executable('prog', 'prog.cc', cxx_args : '-DCXXTHING')
+    executable('prog', 'prog.cc', cpp_args : '-DCPPTHING')

 Here we create a C++ executable with an extra preprocessor definition. 

&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 19:35:13 -0000</pubDate><guid>https://sourceforge.net738a80f1a9f68caa7ec2d5ff0be6e2c7991c6cdd</guid></item><item><title>Adding flags modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Adding%2520flags/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -8,7 +8,7 @@

 Global compiler flags are set with the following command.

-&lt;tt&gt;add_global_arguments('-std=c99', language : 'c')&lt;/tt&gt;
+    add_global_arguments('-std=c99', language : 'c')

 This sets the flag that controls the C language standard used.

@@ -21,7 +21,7 @@

 Per target flags are just as simple to define.

-&lt;tt&gt;executable('prog', 'prog.cc', cxx_args : '-DCXXTHING')&lt;/tt&gt;
+    executable('prog', 'prog.cc', cxx_args : '-DCXXTHING')

 Here we create a C++ executable with an extra preprocessor definition. 

&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 10:25:32 -0000</pubDate><guid>https://sourceforge.nete14b6b190cd5c12fa7d35444caa502167648e657</guid></item><item><title>WikiPage Adding flags modified by Jussi Pakkanen</title><link>https://sourceforge.net/p/meson/wiki/Adding%2520flags/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="adding-compiler-flags"&gt;Adding compiler flags&lt;/h1&gt;
&lt;p&gt;Often you need to specify extra compiler flags. Meson provides two different ways to achieve this: global flags and per-target flags.&lt;/p&gt;
&lt;h2 id="global-flags"&gt;Global flags&lt;/h2&gt;
&lt;p&gt;Global compiler flags are set with the following command.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;add_global_arguments('-std=c99', language : 'c')&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;This sets the flag that controls the C language standard used.&lt;/p&gt;
&lt;p&gt;Global arguments have certain limitations. They all have to be defined before any build targets are specified. This ensures that the global flags are the same for every single source file built in the entire project. For this reason you should set only the most essential flags with this setting.&lt;/p&gt;
&lt;p&gt;You should &lt;em&gt;not&lt;/em&gt; set debug or optimization flags with this function. Instead they should be specified with the build type feature.&lt;/p&gt;
&lt;h2 id="per-target-flags"&gt;Per target flags&lt;/h2&gt;
&lt;p&gt;Per target flags are just as simple to define.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;executable('prog', 'prog.cc', cxx_args : '-DCXXTHING')&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;Here we create a C++ executable with an extra preprocessor definition. &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:36:45 -0000</pubDate><guid>https://sourceforge.net86f1576dee9f0d3be94db6f91b0436ffb56528e4</guid></item></channel></rss>