From d988f5340f2ad2922aec4b837991e1b9a6f6d49e Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Fri, 29 Sep 2023 12:11:07 +0200 Subject: [PATCH] Fix doc generation --- build.rs | 4 ++++ docs/conf.py | 1 + include/zenoh_commons.h | 4 ++++ include/zenoh_concrete.h | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/build.rs b/build.rs index 6cec23060..5ef4c04d1 100644 --- a/build.rs +++ b/build.rs @@ -17,6 +17,10 @@ const HEADER: &str = r"// // Contributors: // ZettaScale Zenoh Team, // +#ifdef DOCS +#define ALIGN(n) +#define ZENOHC_API +#endif "; fn main() { diff --git a/docs/conf.py b/docs/conf.py index 1c18dafc7..48894d533 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,6 +26,7 @@ extensions = ['sphinx_c_autodoc', 'sphinx_c_autodoc.napoleon'] language = 'c' c_autodoc_roots = ['../include'] +c_autodoc_compilation_args = ["-DDOCS"] # -- Options for HTML output ------------------------------------------------- html_theme = 'sphinx_rtd_theme' diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 91ebce629..763c267aa 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -11,6 +11,10 @@ // Contributors: // ZettaScale Zenoh Team, // +#ifdef DOCS +#define ALIGN(n) +#define ZENOHC_API +#endif /** * The kind of congestion control. * diff --git a/include/zenoh_concrete.h b/include/zenoh_concrete.h index 1110523db..000004c3e 100644 --- a/include/zenoh_concrete.h +++ b/include/zenoh_concrete.h @@ -11,6 +11,10 @@ // Contributors: // ZettaScale Zenoh Team, // +#ifdef DOCS +#define ALIGN(n) +#define ZENOHC_API +#endif #include #include #include