Skip to content

Commit a9ba4ea

Browse files
committed
Fixed Doxygen generation
1 parent 4929a06 commit a9ba4ea

4 files changed

Lines changed: 35 additions & 5623 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,25 @@ install(
8181
COMPONENT sbgraph
8282
)
8383

84+
# Documentation
85+
set(DOC_PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
86+
string(REPLACE ";" " " DOXYGEN_INPUT_DIR "${DOC_PATHS}")
87+
88+
set(DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
89+
90+
set(DOXYGEN_EXCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
91+
92+
set(DOXYGEN_MAINPAGE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
93+
94+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
95+
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
96+
8497
add_custom_target(doc
8598
COMMAND echo "Generating Project documentation."
99+
COMMAND doxygen "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
100+
#COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/doc
101+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
102+
COMMENT "Generating API documentation with Doxygen"
86103
)
87104

88-
add_dependencies(doc eval-doc sbg-doc util-doc)
89-
90105
set_target_properties(doc PROPERTIES EXCLUDE_FROM_ALL ON)

eval/EVAL.doxyfile renamed to Doxyfile.in

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ PROJECT_LOGO =
6868
# entered, it will be relative to the location where doxygen was started. If
6969
# left blank the current directory will be used.
7070

71-
OUTPUT_DIRECTORY = ../doc/eval
71+
OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIR@
7272

7373
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
7474
# sub-directories (in 2 levels) under the output directory of each output format
@@ -162,7 +162,7 @@ INLINE_INHERITED_MEMB = NO
162162
# shortest path that makes the file name unique will be used
163163
# The default value is: YES.
164164

165-
FULL_PATH_NAMES = YES
165+
FULL_PATH_NAMES = NO
166166

167167
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
168168
# Stripping is only done if one of the specified strings matches the left-hand
@@ -174,7 +174,7 @@ FULL_PATH_NAMES = YES
174174
# will be relative from the directory where doxygen is started.
175175
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
176176

177-
STRIP_FROM_PATH =
177+
STRIP_FROM_PATH = YES
178178

179179
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
180180
# path mentioned in the documentation of a class, which tells the reader which
@@ -933,7 +933,7 @@ WARN_LOGFILE =
933933
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
934934
# Note: If this tag is empty the current directory is searched.
935935

936-
INPUT = eval
936+
INPUT = @DOXYGEN_INPUT_DIR@
937937

938938
# This tag can be used to specify the character encoding of the source files
939939
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -973,13 +973,13 @@ INPUT_FILE_ENCODING =
973973
# provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
974974
# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
975975

976-
FILE_PATTERNS =
976+
FILE_PATTERNS = *.cpp *.hpp *.md
977977

978978
# The RECURSIVE tag can be used to specify whether or not subdirectories should
979979
# be searched for input files as well.
980980
# The default value is: NO.
981981

982-
RECURSIVE = NO
982+
RECURSIVE = YES
983983

984984
# The EXCLUDE tag can be used to specify files and/or directories that should be
985985
# excluded from the INPUT source files. This way you can easily exclude a
@@ -988,7 +988,13 @@ RECURSIVE = NO
988988
# Note that relative paths are relative to the directory from which doxygen is
989989
# run.
990990

991-
EXCLUDE =
991+
EXCLUDE = @DOXYGEN_EXCLUDE_DIR@/3rd-party \
992+
@DOXYGEN_EXCLUDE_DIR@/autom4te.cache \
993+
@DOXYGEN_EXCLUDE_DIR@/build \
994+
@DOXYGEN_EXCLUDE_DIR@/deploy \
995+
@DOXYGEN_EXCLUDE_DIR@/install \
996+
@DOXYGEN_EXCLUDE_DIR@/lib \
997+
@DOXYGEN_EXCLUDE_DIR@/obj
992998

993999
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
9941000
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -1004,7 +1010,9 @@ EXCLUDE_SYMLINKS = NO
10041010
# Note that the wildcards are matched against the file with absolute path, so to
10051011
# exclude all test directories for example use the pattern */test/*
10061012

1007-
EXCLUDE_PATTERNS =
1013+
EXCLUDE_PATTERNS = */build/* \
1014+
*/cmake/* \
1015+
*/.git/*
10081016

10091017
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
10101018
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -1099,7 +1107,7 @@ FILTER_SOURCE_PATTERNS =
10991107
# (index.html). This can be useful if you have a project on for instance GitHub
11001108
# and want to reuse the introduction page also for the doxygen output.
11011109

1102-
USE_MDFILE_AS_MAINPAGE =
1110+
USE_MDFILE_AS_MAINPAGE = @DOXYGEN_MAINPAGE_DIR@/README.md
11031111

11041112
# The Fortran standard specifies that for fixed formatted Fortran code all
11051113
# characters from position 72 are to be considered as comment. A common
@@ -1134,7 +1142,7 @@ INLINE_SOURCES = NO
11341142
# Fortran comments will always remain visible.
11351143
# The default value is: YES.
11361144

1137-
STRIP_CODE_COMMENTS = YES
1145+
STRIP_CODE_COMMENTS = NO
11381146

11391147
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
11401148
# entity all documented functions referencing it will be listed.

0 commit comments

Comments
 (0)