Skip to content

Commit

Permalink
[doc] Build doxygen documentation with CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
cgraeser committed Nov 26, 2024
1 parent a241053 commit a02023b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
1 change: 1 addition & 0 deletions ADOL-C/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(doc)
1 change: 1 addition & 0 deletions ADOL-C/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(doxygen)
15 changes: 15 additions & 0 deletions ADOL-C/doc/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
find_package(Doxygen)

if(DOXYGEN_FOUND)

set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)

add_custom_target(doxygen
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating class documentation using Doxygen"
VERBATIM)

endif()
10 changes: 5 additions & 5 deletions ADOL-C/doc/doxygen/Doxyfile → ADOL-C/doc/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY =
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
Expand Down Expand Up @@ -591,7 +591,7 @@ HIDE_UNDOC_MEMBERS = NO
# if EXTRACT_ALL is enabled.
# The default value is: NO.

HIDE_UNDOC_CLASSES = YES
HIDE_UNDOC_CLASSES = NO

# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# declarations. If set to NO, these declarations will be included in the
Expand Down Expand Up @@ -943,9 +943,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../../include/adolc/ \
Mainpage.md \
Topics.md
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../../include/adolc/ \
@CMAKE_CURRENT_SOURCE_DIR@/Mainpage.md \
@CMAKE_CURRENT_SOURCE_DIR@/Topics.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
13 changes: 8 additions & 5 deletions ADOL-C/doc/doxygen/Mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ featuring e.g.

### Class documentation

The library contains a class documentation which can be build using [doxygen].
You can build the documentation using
The library contains a class documentation generated by using [doxygen].
In order to generate it, it is required that the `doxygen` program
is available and found by CMake. After the project was configured using
CMake and if doxygen was found, the documentation can
be build by calling
```shell
doxygen Doxyfile
make doxygen
```
from within thd `doc/` subdirectory.
from within the build directory. The entry page of the documentation is located
in `ADOL-C/doc/doxygen/html/index.html` within the build directory.
For an overview of the contained features and submodules
you can e.g. refer to the [Topics](topics.html) section of the doxygen documentation.

@todo Add support for building the class documentation with cmake.

### Manual

Expand Down

0 comments on commit a02023b

Please sign in to comment.