forked from NOAA-EMC/WW3
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable doxygen documentation in the cmake build system (NOAA-EMC#1281)
- Loading branch information
1 parent
b4e119e
commit abc77b9
Showing
4 changed files
with
41 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
EnableDoxygen(docs) |
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Doxygen documentation- Matt Masarik 24-Jul-2024. | ||
function(EnableDoxygen outdir) | ||
find_package(Doxygen REQUIRED) | ||
if (NOT DOXYGEN_FOUND) | ||
add_custom_target(enable_docs | ||
COMMAND false | ||
COMMENT "Doxygen not found") | ||
return() | ||
endif() | ||
|
||
set(src_input "${CMAKE_SOURCE_DIR}/model/src") | ||
set(doc_output "${CMAKE_BINARY_DIR}/${outdir}") | ||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}/html) | ||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in | ||
${CMAKE_BINARY_DIR}/${outdir}/Doxyfile @ONLY) | ||
set(DOXYGEN_GENERATE_HTML YES) | ||
set(DOXYGEN_QUIET YES) | ||
add_custom_target(enable_docs | ||
COMMAND | ||
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile | ||
WORKING_DIRECTORY | ||
${CMAKE_BINARY_DIR}/${outdir} | ||
COMMENT | ||
"Generate Doxygen HTML documentation") | ||
message("-- Doxygen HTML index page: " | ||
${CMAKE_BINARY_DIR}/${outdir}/html/index.html) | ||
endfunction() |