-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from eirrgang/docs
Update documentation build targets
- Loading branch information
Showing
13 changed files
with
2,540 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,45 @@ | ||
configure_file(Doxyfile.in Doxyfile) | ||
|
||
|
||
############################## | ||
# Python package documentation | ||
############################## | ||
|
||
# Dummy output which is never actually produced. Anything that depends on | ||
# this will always be rebuilt. Ref: https://stackoverflow.com/a/32062884/5351807 | ||
add_custom_command( | ||
OUTPUT always_rebuild | ||
COMMAND cmake -E echo | ||
OUTPUT always_rebuild | ||
COMMAND cmake -E echo | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT | ||
objects.inv | ||
DEPENDS | ||
always_rebuild | ||
COMMAND | ||
${PYTHON_EXECUTABLE} -m sphinx -b html ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT | ||
"Generating documentation with Sphinx" | ||
VERBATIM | ||
OUTPUT | ||
objects.inv | ||
DEPENDS | ||
always_rebuild | ||
COMMAND | ||
${PYTHON_EXECUTABLE} -m sphinx -b html ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT | ||
"Generating documentation with Sphinx" | ||
VERBATIM | ||
) | ||
|
||
add_custom_target( | ||
docs | ||
DEPENDS objects.inv | ||
docs | ||
DEPENDS objects.inv | ||
) | ||
|
||
################################ | ||
# C++ internal API documentation | ||
################################ | ||
find_package(Doxygen) | ||
if (DOXYGEN_FOUND) | ||
add_custom_target(cppdocs | ||
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT "Generating developer documentation" | ||
VERBATIM ) | ||
else (DOXYGEN_FOUND) | ||
message("Doxygen need to be installed to generate the C++ documentation") | ||
endif (DOXYGEN_FOUND) | ||
################################ |
Oops, something went wrong.