Skip to content

Commit 01f73f2

Browse files
author
Matt Woodward
committed
Add comments
1 parent ba3e6c6 commit 01f73f2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ClangTidy.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
# This function must be called with one of the above options, or it must be able to
5555
# find a custom script in the file system otherwise it will throw an error.
5656
#
57+
# The option EXTRA_ARGS may be used to pass command line options directly to the
58+
# clang-tidy command. This can be useful or even required when a compiler other
59+
# than clang is used to configure the project. clang-tidy will use the compile_commands.json
60+
# database to work out how to analyse files, but some GNU options are not understood.
61+
#
62+
# swift_setup_clang_tidy(EXTRA_ARGS '-extra-arg=-Wno-unknown-warning-option')
63+
#
64+
# will disable a clang-tidy error when it encounters a compiler warning switch it
65+
# doesn't support, such as -Wno-psabi (GNU does understand this one)
66+
#
5767
# All commands are run from ${CMAKE_CURRENT_SOURCE_DIR}. It is highly recommended
5868
# that this module only be included from the top level CMakeLists.txt of a project,
5969
# using it from a subdirectory may not work as expected.

0 commit comments

Comments
 (0)