Doxygen: set warning format for MSVC builds
When using Visual Studio (MSVC), have Doxygen output its warnings with the file/line prefix in the MSVC standard, so that double-clicking on the warnings brings you to the right source location. Change-Id: If492f83a651cf6d4a38186c9e36ffcb57f1d72ce Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55801 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
6241f962a1
commit
e25a8fc7f0
|
@ -149,11 +149,18 @@ if(${TINT_BUILD_DOCS})
|
||||||
if(TINT_DOCS_WARN_AS_ERROR)
|
if(TINT_DOCS_WARN_AS_ERROR)
|
||||||
set(DOXYGEN_WARN_AS_ERROR YES)
|
set(DOXYGEN_WARN_AS_ERROR YES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(DOXYGEN_WARN_FORMAT "$file:$line: $text")
|
||||||
|
if (MSVC)
|
||||||
|
set(DOXYGEN_WARN_FORMAT "$file($line): $text")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_target(tint-docs ALL
|
add_custom_target(tint-docs ALL
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-E env
|
-E env
|
||||||
"DOXYGEN_OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}/docs"
|
"DOXYGEN_OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}/docs"
|
||||||
"DOXYGEN_WARN_AS_ERROR=${DOXYGEN_WARN_AS_ERROR}"
|
"DOXYGEN_WARN_AS_ERROR=${DOXYGEN_WARN_AS_ERROR}"
|
||||||
|
"DOXYGEN_WARN_FORMAT=${DOXYGEN_WARN_FORMAT}"
|
||||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Generating API documentation"
|
COMMENT "Generating API documentation"
|
||||||
|
|
2
Doxyfile
2
Doxyfile
|
@ -767,7 +767,7 @@ WARN_AS_ERROR = $(DOXYGEN_WARN_AS_ERROR)
|
||||||
# FILE_VERSION_FILTER)
|
# FILE_VERSION_FILTER)
|
||||||
# The default value is: $file:$line: $text.
|
# The default value is: $file:$line: $text.
|
||||||
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = $(DOXYGEN_WARN_FORMAT)
|
||||||
|
|
||||||
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
||||||
# messages should be written. If left blank the output is written to standard
|
# messages should be written. If left blank the output is written to standard
|
||||||
|
|
Loading…
Reference in New Issue