mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 18:32:35 +01:00
Cmake options to customise doxygen warnings. (#15071)
* Add: Cmake otion to hide line numbers in doxygen warnings. * Add: Cmake options to specify output file for doxygen warnings. Adds 3 options each one for each docs target, because doxygen deletes content of the specified file before it begins to write into it.
This commit is contained in:
committed by
GitHub
parent
dc15cd30e8
commit
9e9b51369e
@@ -75,6 +75,10 @@ add_custom_target(find_version
|
||||
-DREV_MAJOR=${PROJECT_VERSION_MAJOR}
|
||||
-DREV_MINOR=${PROJECT_VERSION_MINOR}
|
||||
-DWINDOWS=${WIN32}
|
||||
-DDOXYGEN_WARN_FORMAT_LINE=${DOXYGEN_WARN_FORMAT_LINE}
|
||||
-DDOXYGEN_WARN_FILE=${DOXYGEN_WARN_FILE}
|
||||
-DDOXYGEN_GS_WARN_FILE=${DOXYGEN_GS_WARN_FILE}
|
||||
-DDOXYGEN_AI_WARN_FILE=${DOXYGEN_AI_WARN_FILE}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
BYPRODUCTS ${GENERATED_SOURCE_FILES}
|
||||
|
||||
@@ -120,9 +120,9 @@ WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_FORMAT = "$file:$${DOXYGEN_WARN_FORMAT_LINE}: $text"
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
WARN_LOGFILE =
|
||||
WARN_LOGFILE = ${DOXYGEN_WARN_FILE}
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -61,12 +61,32 @@ function(set_options)
|
||||
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
|
||||
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
|
||||
option(OPTION_ALLOW_INVALID_SIGNATURE "Allow loading of content with invalid signatures" OFF)
|
||||
option(OPTION_LINE_IN_DOXYGEN_WARNINGS "Print line number in doxygen warnings" ON)
|
||||
|
||||
if (OPTION_DOCS_ONLY)
|
||||
set(OPTION_TOOLS_ONLY ON PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if (OPTION_LINE_IN_DOXYGEN_WARNINGS)
|
||||
set(DOXYGEN_WARN_FORMAT_LINE "line" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
option(OPTION_SURVEY_KEY "Survey-key to use for the opt-in survey (empty if you have none)" "")
|
||||
option(OPTION_DOXYGEN_WARN_FILE "File to write doxygen warnings into (if empty warnings are written to standard error)" "")
|
||||
option(OPTION_DOXYGEN_GS_WARN_FILE "File to write doxygen warnings from game script docs into (if empty warnings are written to standard error)" "")
|
||||
option(OPTION_DOXYGEN_AI_WARN_FILE "File to write doxygen warnings from AI docs into (if empty warnings are written to standard error)" "")
|
||||
|
||||
if(OPTION_DOXYGEN_WARN_FILE)
|
||||
set(DOXYGEN_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_WARN_FILE} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(OPTION_DOXYGEN_GS_WARN_FILE)
|
||||
set(DOXYGEN_GS_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_GS_WARN_FILE} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(OPTION_DOXYGEN_AI_WARN_FILE)
|
||||
set(DOXYGEN_AI_WARN_FILE ${CMAKE_BINARY_DIR}/${OPTION_DOXYGEN_AI_WARN_FILE} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Show the values of the generic options.
|
||||
|
||||
@@ -120,9 +120,9 @@ WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_FORMAT = "$file:$${DOXYGEN_WARN_FORMAT_LINE}: $text"
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
WARN_LOGFILE =
|
||||
WARN_LOGFILE = ${DOXYGEN_AI_WARN_FILE}
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -120,9 +120,9 @@ WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_FORMAT = "$file:$${DOXYGEN_WARN_FORMAT_LINE}: $text"
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
WARN_LOGFILE =
|
||||
WARN_LOGFILE = ${DOXYGEN_GS_WARN_FILE}
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user