Skip to content

Commit

Permalink
Merge pull request #7219 from mayrmt/7218-xpetra-add-doxygen-target
Browse files Browse the repository at this point in the history
Xpetra: add build target for doxygen documentation
  • Loading branch information
mayrmt authored Apr 21, 2020
2 parents 2c40fee + 8706f49 commit 582a2d7
Show file tree
Hide file tree
Showing 13 changed files with 354 additions and 119 deletions.
4 changes: 2 additions & 2 deletions packages/muelu/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
add_custom_target(doc_muelu
TRILINOS_HOME=${PROJECT_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
COMMENT "Generating ${PACKAGE_NAME} API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)

Expand Down
2 changes: 1 addition & 1 deletion packages/muelu/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This file is used by doxygen for building documentation in the source tree
#
@INCLUDE = Doxyfile.options
INPUT = ./MueLu_DoxygenDocumentation.hpp ../src ../adapters ./MueLu_groups ../matlab/src
INPUT = ./MueLu_DoxygenDocumentation.hpp ./MueLu_groups ../src ../adapters ../matlab/src
2 changes: 1 addition & 1 deletion packages/muelu/doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This file is used by doxygen for building documentation in the build tree
#
@INCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/Doxyfile.options
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../src @CMAKE_CURRENT_SOURCE_DIR@/../adapters @CMAKE_CURRENT_SOURCE_DIR@/MueLu_DoxygenDocumentation.hpp @CMAKE_CURRENT_SOURCE_DIR@/../matlab/src
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/MueLu_DoxygenDocumentation.hpp @CMAKE_CURRENT_SOURCE_DIR@/MueLu_groups @CMAKE_CURRENT_SOURCE_DIR@/../src @CMAKE_CURRENT_SOURCE_DIR@/../adapters @CMAKE_CURRENT_SOURCE_DIR@/../matlab/src
13 changes: 0 additions & 13 deletions packages/muelu/doc/README

This file was deleted.

13 changes: 13 additions & 0 deletions packages/muelu/doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Doxygen

`MueLu`'s documentation is built in the build tree:

1. Run your `cmake` configure line or script.
1. In the <buildDirectory>, type `make doc_muelu`.

The documentation will be placed in `<buildDirectory>/packages/muelu/doc/html`.

# User's Guide

The user's guide is in `muelu/doc/UsersGuide`.
To build the guide, simply run `make` in `muelu/doc/UsersGuide`, which should produce `mueluguide.pdf`.
5 changes: 5 additions & 0 deletions packages/xpetra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ TRIBITS_ADD_OPTION_AND_DEFINE(
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(sup)

IF (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/CMakeLists.txt)
ADD_SUBDIRECTORY(doc)
ENDIF()

TRIBITS_ADD_EXAMPLE_DIRECTORIES(example)
TRIBITS_ADD_EXAMPLE_DIRECTORIES(research)
TRIBITS_ADD_TEST_DIRECTORIES(test)
Expand Down
10 changes: 10 additions & 0 deletions packages/xpetra/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc_xpetra
TRILINOS_HOME=${PROJECT_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating ${PACKAGE_NAME} API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
33 changes: 1 addition & 32 deletions packages/xpetra/doc/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
# Note: all relative paths are relative to package/doc!
#
@INCLUDE = Doxyfile.options
TAGFILES += \
$(TRILINOS_HOME)/packages/common/tag_files/teuchos.tag=$(TRILINOS_HOME)/packages/teuchos/doc/html \
$(TRILINOS_HOME)/packages/common/tag_files/epetra.tag=$(TRILINOS_HOME)/packages/epetra/doc/html \
$(TRILINOS_HOME)/packages/common/tag_files/epetra.tag=$(TRILINOS_HOME)/packages/tpetra/doc/html
#
# Package options
#
PROJECT_NAME = "Xpetra"
OUTPUT_DIRECTORY = .
#
# What and how documentation is extracted
#
INPUT = ../src ./Xpetra_DoxygenDocumentation.hpp ../sup
#FILE_PATTERNS = *.h *c *.hpp *.cpp
RECURSIVE = YES
EXCLUDE =
EXCLUDE_PATTERNS = *.x *.o *.out
EXAMPLE_PATTERNS =
EXAMPLE_PATH = ../examples .
IMAGE_PATH = ./images
INPUT_FILTER =
ALPHABETICAL_INDEX = YES
IGNORE_PREFIX =
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
#
# Links to other packages
#
ALLEXTERNALS = NO
EXTERNAL_GROUPS = NO
GENERATE_TAGFILE = $(TRILINOS_HOME)/packages/common/tag_files/xpetra.tag
HTML_HEADER = header.html
INPUT = ./Xpetra_DoxygenDocumentation.hpp ../src ../sup
5 changes: 5 additions & 0 deletions packages/xpetra/doc/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# This file is used by doxygen for building documentation in the build tree
#
@INCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/Doxyfile.options
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/Xpetra_DoxygenDocumentation.hpp @CMAKE_CURRENT_SOURCE_DIR@/../src @CMAKE_CURRENT_SOURCE_DIR@/../sup
Loading

0 comments on commit 582a2d7

Please sign in to comment.