Skip to content

Commit 3600720

Browse files
authored
Merge pull request #3 from stlab/sean-parent/fixes
Doc preset target fixed to workaround vscode bug. Doxygen warnings are now be reported to the CMake/build output Patched a doxygen-awesome-css issue for template formatting. Enabled the DISTRIBUTE_GROUP_DOC feature of Doxygen to simplify documenting related functions.
2 parents 38315a2 + b4d02bf commit 3600720

File tree

4 files changed

+59
-26
lines changed

4 files changed

+59
-26
lines changed

cmake/cpp-library-docs.cmake

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,24 @@ function(_cpp_library_setup_docs)
5757
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
5858
endif()
5959

60-
# Add custom target for documentation
61-
add_custom_target(docs
62-
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
63-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
64-
COMMENT "Generating API documentation with Doxygen"
65-
VERBATIM
66-
)
60+
# Add custom target for documentation with proper stderr capture
61+
if(WIN32)
62+
# On Windows, use PowerShell to redirect stderr to stdout
63+
add_custom_target(docs
64+
COMMAND PowerShell -Command "& { ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} 2>&1 }"
65+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
66+
COMMENT "Generating API documentation with Doxygen"
67+
VERBATIM
68+
)
69+
else()
70+
# On Unix-like systems, use shell redirection
71+
add_custom_target(docs
72+
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} 2>&1
73+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
74+
COMMENT "Generating API documentation with Doxygen"
75+
VERBATIM
76+
)
77+
endif()
6778

6879
# Ensure the output directory exists
6980
file(MAKE_DIRECTORY ${OUTPUT_DIR})

templates/CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"buildPresets": [
7474
{ "name": "default", "displayName": "Default Build", "configurePreset": "default" },
7575
{ "name": "test", "displayName": "Build Tests", "configurePreset": "test" },
76-
{ "name": "docs", "displayName": "Build Docs", "configurePreset": "docs", "targets": ["docs"] },
76+
{ "name": "docs", "displayName": "Build Docs", "configurePreset": "docs", "targets": "docs" },
7777
{ "name": "clang-tidy", "displayName": "Build with Clang-Tidy", "configurePreset": "clang-tidy" },
7878
{ "name": "init", "displayName": "Initialize Templates", "configurePreset": "init" }
7979
],

templates/Doxyfile.in

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
# Auto-generated from cpp-library (https://github.com/stlab/cpp-library)
22
# Do not edit this file directly - it will be overwritten when templates are regenerated
33

4-
PROJECT_NAME = "@PROJECT_NAME@"
5-
PROJECT_BRIEF = "@PROJECT_BRIEF@"
6-
PROJECT_NUMBER = @PROJECT_VERSION@
7-
OUTPUT_DIRECTORY = @OUTPUT_DIR@
8-
GENERATE_LATEX = NO
9-
QUIET = YES
10-
WARN_IF_UNDOCUMENTED = YES
11-
INPUT = @INPUT_DIR@
12-
RECURSIVE = YES
13-
EXCLUDE_SYMBOLS = @EXCLUDE_SYMBOLS@
14-
EXAMPLE_PATH = @EXAMPLES_PATH@
15-
HIDE_UNDOC_NAMESPACES = NO
16-
HTML_EXTRA_STYLESHEET = @AWESOME_CSS_PATH@/doxygen-awesome.css \
17-
@AWESOME_CSS_PATH@/doxygen-awesome-sidebar-only.css
18-
HTML_COLORSTYLE = LIGHT
19-
GENERATE_TREEVIEW = YES
20-
DISABLE_INDEX = NO
21-
FULL_SIDEBAR = NO
4+
PROJECT_NAME = "@PROJECT_NAME@"
5+
PROJECT_BRIEF = "@PROJECT_BRIEF@"
6+
PROJECT_NUMBER = @PROJECT_VERSION@
7+
OUTPUT_DIRECTORY = @OUTPUT_DIR@
8+
GENERATE_LATEX = NO
9+
QUIET = YES
10+
WARN_IF_UNDOCUMENTED = YES
11+
INPUT = @INPUT_DIR@
12+
RECURSIVE = YES
13+
EXCLUDE_SYMBOLS = @EXCLUDE_SYMBOLS@
14+
EXAMPLE_PATH = @EXAMPLES_PATH@
15+
HIDE_UNDOC_NAMESPACES = NO
16+
HTML_EXTRA_STYLESHEET = @AWESOME_CSS_PATH@/doxygen-awesome.css \
17+
@AWESOME_CSS_PATH@/doxygen-awesome-sidebar-only.css \
18+
@CPP_LIBRARY_ROOT@/templates/custom.css
19+
HTML_COLORSTYLE = LIGHT
20+
GENERATE_TREEVIEW = YES
21+
DISABLE_INDEX = NO
22+
FULL_SIDEBAR = NO
2223
# USE_MDFILE_AS_MAINPAGE = README.md
24+
DISTRIBUTE_GROUP_DOC = YES

templates/custom.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
3+
4+
https://github.com/jothepro/doxygen-awesome-css/issues/186
5+
6+
*/
7+
8+
table.memberdecls .memItemLeft,
9+
table.memberdecls .memItemRight,
10+
table.memberdecls .memTemplItemLeft,
11+
table.memberdecls .memTemplItemRight,
12+
table.memberdecls .memTemplParams {
13+
padding-top: unset;
14+
border-top: unset;
15+
}
16+
17+
table.memberdecls .memTemplParams {
18+
border-bottom: 0;
19+
padding-bottom: 0;
20+
}

0 commit comments

Comments
 (0)