Skip to content

Commit

Permalink
Generate doxygen config for completeness check on-the-fly.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Mar 28, 2024
1 parent d0d77c2 commit eadd8fc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2,783 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/doxygen-completeness-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ jobs:
name: Doxygen completeness check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run doxygen for C++ programs.
uses: mattnotmitt/doxygen-action@v1.9.5
with:
working-directory: '.'
doxyfile-path: 'doxygen.cfg'
- name: Create doxygen config
run: cmake -P "cmake/generate-doxygen-config.cmake"
- uses: actions/checkout@v3
- name: Run doxygen for C++ programs.
uses: mattnotmitt/doxygen-action@v1.9.5
with:
working-directory: '.'
doxyfile-path: 'doxygen.cfg'
12 changes: 12 additions & 0 deletions cmake/generate-doxygen-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg)

message(STATUS ${DOXYFILE_IN})
message(STATUS ${DOXYFILE_OUT})

set(WARN_ON_DOC_ERROR "YES")
set(DOXYGEN_INPUT_DIR include/${PROJECT_NAME})
set(DOXYGEN_OUTPUT_DIR build)

# Replace variables inside @@ with the current values
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
3 changes: 2 additions & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ find_package(Doxygen REQUIRED)
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

set(WARN_ON_DOC_ERROR "YES")
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME})
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html)
#set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html)
file(GLOB_RECURSE project_public_headers ${DOXYGEN_INPUT_DIR}/*.h)

# Replace variables inside @@ with the current values
Expand Down
4 changes: 2 additions & 2 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -860,14 +860,14 @@ WARN_IF_UNDOCUMENTED = YES
# using markup commands wrongly.
# The default value is: YES.

WARN_IF_DOC_ERROR = YES
WARN_IF_DOC_ERROR = @WARN_ON_DOC_ERROR@

# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
# function parameter documentation. If set to NO, doxygen will accept that some
# parameters have no documentation without warning.
# The default value is: YES.

WARN_IF_INCOMPLETE_DOC = YES
WARN_IF_INCOMPLETE_DOC = @WARN_ON_DOC_ERROR@

# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
Expand Down
4 changes: 1 addition & 3 deletions docs/sphinx-source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ type and scrambled it to make a type specimen book. From `<https://www.lipsum.co
Docs
====

.. doxygennamespace:: Atheneum
:project: atheneum

.. doxygenclass:: Atheneum::Atheneum

Indices and tables
==================
Expand Down
Loading

0 comments on commit eadd8fc

Please sign in to comment.