gdbus-codegen: Add support for pragma inclusion guard

The #pragma once is widely supported preprocessor directive that can
be used instead of include guards.

This adds support for using optionally this directive instead of
include guards.

https://bugzilla.gnome.org/show_bug.cgi?id=791015
This commit is contained in:
Iñigo Martínez
2018-01-03 17:01:30 +01:00
parent e59bce3c74
commit c658d03b76
3 changed files with 32 additions and 8 deletions

View File

@@ -35,6 +35,7 @@
<arg><option>--c-generate-autocleanup</option> none|objects|all</arg>
<arg><option>--output-directory</option> <replaceable>OUTDIR</replaceable></arg>
<arg><option>--generate-docbook</option> <replaceable>OUTFILES</replaceable></arg>
<arg><option>--pragma-once</option></arg>
<arg><option>--xml-files</option> <replaceable>FILE</replaceable></arg>
<group choice="plain" rep="repeat">
<arg>
@@ -215,6 +216,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pragma-once</option></term>
<listitem>
<para>
If this option is passed, the
<ulink url="https://en.wikipedia.org/wiki/Pragma_once">&#35;pragma once</ulink>
preprocessor directive is used instead of include guards.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--c-generate-object-manager</option></term>
<listitem>