File tree 4 files changed +41
-5
lines changed
4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ project(
13
13
14
14
get_directory_property (hasParent PARENT_DIRECTORY )
15
15
if (hasParent)
16
- # Unset flags that come from Parent (ie UFS or other coupled build)
16
+ # Unset flags that come from Parent (ie UFS or other coupled build)
17
17
# for potential (-r8/-r4) conflict
18
18
set (CMAKE_Fortran_FLAGS "" )
19
19
set (CMAKE_C_FLAGS "" )
@@ -22,8 +22,9 @@ endif()
22
22
23
23
set (MULTI_ESMF OFF CACHE BOOL "Build ww3_multi_esmf library" )
24
24
set (NETCDF ON CACHE BOOL "Build NetCDF programs (requires NetCDF)" )
25
- set (ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'." )
25
+ set (ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'." )
26
26
set (EXCLUDE_FIND "" CACHE STRING "Don't try and search for these libraries (assumd to be handled by the compiler/wrapper)" )
27
+ set (ENABLE_DOCS OFF CACHE BOOL "Enable building of doxygen generated documentation" )
27
28
28
29
# make sure all "exclude_find" entries are lower case
29
30
list (TRANSFORM EXCLUDE_FIND TOLOWER)
@@ -59,6 +60,13 @@ endif()
59
60
60
61
add_subdirectory (model)
61
62
63
+ # Turn on doxygen documentation
64
+ if (ENABLE_DOCS)
65
+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /docs/cmake" )
66
+ include (EnableDoxygen)
67
+ add_subdirectory (docs)
68
+ endif ()
69
+
62
70
# Turn on unit testing.
63
71
#include(CTest)
64
72
#if(BUILD_TESTING)
Original file line number Diff line number Diff line change
1
+ EnableDoxygen(docs)
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ PROJECT_LOGO =
58
58
# entered, it will be relative to the location where doxygen was started. If
59
59
# left blank the current directory will be used.
60
60
61
- OUTPUT_DIRECTORY = docs
61
+ OUTPUT_DIRECTORY = @doc_output@
62
62
63
63
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64
64
# directories (in 2 levels) under the output directory of each output format and
@@ -829,7 +829,7 @@ WARN_LOGFILE =
829
829
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
830
830
# Note: If this tag is empty the current directory is searched.
831
831
832
- INPUT = model/src
832
+ INPUT = @src_input@
833
833
834
834
# This tag can be used to specify the character encoding of the source files
835
835
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2285,7 +2285,7 @@ CLASS_DIAGRAMS = NO
2285
2285
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
2286
2286
# If left empty dia is assumed to be found in the default search path.
2287
2287
2288
- DIA_PATH =
2288
+ DIA_PATH =
2289
2289
2290
2290
# If set to YES the inheritance and collaboration graphs will hide inheritance
2291
2291
# and usage relations if the target is undocumented or is not a class.
Original file line number Diff line number Diff line change
1
+ # Doxygen documentation- Matt Masarik 24-Jul-2024.
2
+ function (EnableDoxygen outdir)
3
+ find_package (Doxygen REQUIRED)
4
+ if (NOT DOXYGEN_FOUND)
5
+ add_custom_target (enable_docs
6
+ COMMAND false
7
+ COMMENT "Doxygen not found" )
8
+ return ()
9
+ endif ()
10
+
11
+ set (src_input "${CMAKE_SOURCE_DIR} /model/src" )
12
+ set (doc_output "${CMAKE_BINARY_DIR} /${outdir} " )
13
+ file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR} /${outdir} /html)
14
+ CONFIGURE_FILE (${CMAKE_SOURCE_DIR} /docs/Doxyfile.in
15
+ ${CMAKE_BINARY_DIR} /${outdir} /Doxyfile @ONLY)
16
+ set (DOXYGEN_GENERATE_HTML YES )
17
+ set (DOXYGEN_QUIET YES )
18
+ add_custom_target (enable_docs
19
+ COMMAND
20
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR} /${outdir} /Doxyfile
21
+ WORKING_DIRECTORY
22
+ ${CMAKE_BINARY_DIR} /${outdir}
23
+ COMMENT
24
+ "Generate Doxygen HTML documentation" )
25
+ message ("-- Doxygen HTML index page: "
26
+ ${CMAKE_BINARY_DIR} /${outdir} /html/index.html)
27
+ endfunction ()
You can’t perform that action at this time.
0 commit comments