From eda137117b4816a017f42ab07f5d5d5d15d88d5d Mon Sep 17 00:00:00 2001 From: Marc Vef Date: Tue, 15 Feb 2022 15:22:15 +0100 Subject: [PATCH 1/2] Parse doxygen private members with Exhale --- CMake/FindSphinx.cmake | 4 +++- docs/sphinx/conf.py.in | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CMake/FindSphinx.cmake b/CMake/FindSphinx.cmake index 9a3c67cbd..1c7db99af 100644 --- a/CMake/FindSphinx.cmake +++ b/CMake/FindSphinx.cmake @@ -585,12 +585,14 @@ function(sphinx_add_docs _target) file(APPEND "${_target_sphinx_conf}" "\n# Setup the exhale extension" + "\nfrom exhale import utils" "\nexhale_args = {" "\n 'containmentFolder': '${_exhale_containment_folder}'," "\n 'rootFileName': '${_exhale_root_file_name}'," "\n 'rootFileTitle': '${_exhale_root_file_title}'," "\n 'doxygenStripFromPath': '${CMAKE_SOURCE_DIR}'," - "\n 'createTreeView': True" + "\n 'createTreeView': True," + "\n 'customSpecificationsMapping': utils.makeCustomSpecificationsMapping(specificationsForKind)" "\n}") endif() diff --git a/docs/sphinx/conf.py.in b/docs/sphinx/conf.py.in index bd1497e18..520dc80ed 100644 --- a/docs/sphinx/conf.py.in +++ b/docs/sphinx/conf.py.in @@ -84,3 +84,23 @@ html_static_path = ['_static'] # -- Extension configuration ------------------------------------------------- copybutton_prompt_text = '$ ' + +# -- Modify Exhale parsing behavior ------------------------------------------ +def specificationsForKind(kind): + ''' + For a given input ``kind``, return the list of reStructuredText specifications + for the associated Breathe directive. + Refer to https://breathe.readthedocs.io/en/latest/directives.html for + the corresponding available doxygen directives + ''' + # Change the defaults for .. doxygenclass:: and .. doxygenstruct:: + if kind == "class" or kind == "struct": + return [ + ":members:", + ":protected-members:", + ":private-members:", + ":undoc-members:" + ] + # An empty list signals to Exhale to use the defaults + else: + return [] -- GitLab From a52950bfca393044cafdf5829f36c6eb764cb6f5 Mon Sep 17 00:00:00 2001 From: Marc Vef Date: Wed, 16 Feb 2022 12:06:03 +0100 Subject: [PATCH 2/2] Update docs dockerfile for exhale:0.3.1 for bugfix See PR https://github.com/svenevs/exhale/pull/154 --- docker/0.9.0/docs/Dockerfile | 8 ++++---- docker/0.9.0/docs/Makefile | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docker/0.9.0/docs/Dockerfile b/docker/0.9.0/docs/Dockerfile index d657d8767..69401a158 100644 --- a/docker/0.9.0/docs/Dockerfile +++ b/docker/0.9.0/docs/Dockerfile @@ -20,11 +20,11 @@ RUN apt-get update && \ pip3 install \ 'sphinx==4.4.0' \ sphinx_rtd_theme \ - 'breathe==4.31.0' \ - 'exhale==0.2.4' \ - 'sphinx-copybutton==0.4.0' \ + 'breathe==4.33.1' \ + 'exhale==0.3.1' \ + 'sphinx-copybutton==0.5.0' \ 'sphinx-multiversion==0.2.4' \ - 'myst_parser==0.15.1' && \ + 'myst_parser==0.17.0' && \ # Clean apt cache to reduce image layer size rm -rf /var/lib/apt/lists/* && \ rm -rf /tmp/doxygen-1.9.2 && \ diff --git a/docker/0.9.0/docs/Makefile b/docker/0.9.0/docs/Makefile index 7f0bd2c05..b86db9c72 100644 --- a/docker/0.9.0/docs/Makefile +++ b/docker/0.9.0/docs/Makefile @@ -1,4 +1,10 @@ .PHONY: all +amd64: + docker build --platform amd64 -t gekkofs/docs:0.9.0 . + +aarch64: + docker build --platform aarch64 -t gekkofs/docs:0.9.0 . + all: - docker build -t gekkofs/docs:0.9.0 . + docker build -t gekkofs/docs:0.9.0 . \ No newline at end of file -- GitLab