1
0

chore: update doc build

This commit is contained in:
2026-01-24 21:25:10 +08:00
parent 43984685bc
commit f7acb3bfa9
2 changed files with 25 additions and 8 deletions

View File

@@ -1,19 +1,36 @@
# Configure Doxygen config file # Extract all public macros defined in LibCmo
# However, you should note that these extratcted macros have generator expressions.
get_target_property(LIBCMO_COMPILE_DEFINITIONS LibCmo COMPILE_DEFINITIONS)
if (LIBCMO_COMPILE_DEFINITIONS STREQUAL "LIBCMO_COMPILE_DEFINITIONS-NOTFOUND")
message(FATAL_ERROR "Cannot extract compile definitions from LibCmo.")
endif ()
# Convert list to string for expanding in future.
list(JOIN LIBCMO_COMPILE_DEFINITIONS " " LIBCMO_MACRO_GENERATOR_EXPRESSIONS)
# We simply configure Doxygen config file first.
configure_file( configure_file(
${CMAKE_CURRENT_LIST_DIR}/Doxyfile.in ${CMAKE_CURRENT_LIST_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
@ONLY @ONLY
) )
# Add custom target # Then we use "file GENERATE" syntax to generate per-config truely Doxyfile used by Doxygen.
add_custom_target (NeMoDocuments # Because there is no "$<>" syntax in Doxyfile, so we can safely use it.
doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile # Please note that the generation of "file GENERATE" syntax will be postponed until the build stage.
file(GENERATE
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/Doxyfile"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
TARGET LibCmo
)
# Add custom target using per-config Doxyfile
add_custom_target (LibCmoDocuments
Doxygen::doxygen "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/Doxyfile"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating LibCmo documentation" VERBATIM COMMENT "Generating documentation" VERBATIM
) )
# Install built documentation # Install built documentation
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
DESTINATION ${NEMO_INSTALL_DOC_PATH} DESTINATION ${NEMO_INSTALL_DOC_PATH}
) )

View File

@@ -2310,7 +2310,7 @@ PERLMOD_MAKEVAR_PREFIX =
# C-preprocessor directives found in the sources and include files. # C-preprocessor directives found in the sources and include files.
# The default value is: YES. # The default value is: YES.
ENABLE_PREPROCESSING = NO ENABLE_PREPROCESSING = YES
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
# in the source code. If set to NO, only conditional compilation will be # in the source code. If set to NO, only conditional compilation will be
@@ -2360,7 +2360,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator. # recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = YYCC_DOXYGEN PREDEFINED = @LIBCMO_MACRO_GENERATOR_EXPRESSIONS@
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The # tag can be used to specify a list of macro names that should be expanded. The