]> git.droids-corp.org - dpdk.git/commitdiff
doc: make doxygen comply with meson werror option
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 29 Sep 2020 16:55:02 +0000 (17:55 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 30 Sep 2020 14:29:38 +0000 (16:29 +0200)
When the --werror meson build option is set, we can set the WARN_AS_ERRORS
doxygen option in the doxygen config flag to get the same behaviour for API
doc building as for building the rest of DPDK. This can help catch
documentation errors sooner in the development process.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
doc/api/doxy-api.conf.in
doc/api/meson.build

index 42d38919d3f80271e09dce151ad86702feff16e3..ddef755c21a03ad40c5793196ef882d6ae11669d 100644 (file)
@@ -108,3 +108,5 @@ GENERATE_LATEX          = NO
 GENERATE_MAN            = NO
 
 HAVE_DOT                = NO
+
+WARN_AS_ERROR           = @WARN_AS_ERROR@
index e9b49f9c2f2de4c1d28c66e2cb935c520ef87843..4f51f5d7240979cc1c93346de73c921a2c49dbcd 100644 (file)
@@ -37,6 +37,10 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
 cdata.set('HTML_OUTPUT', 'html')
 cdata.set('TOPDIR', meson.source_root())
 cdata.set('STRIP_FROM_PATH', meson.source_root())
+cdata.set('WARN_AS_ERROR', 'NO')
+if get_option('werror')
+       cdata.set('WARN_AS_ERROR', 'YES')
+endif
 
 doxy_conf = configure_file(input: 'doxy-api.conf.in',
        output: 'doxy-api.conf',