diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-10-06 05:14:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-07 14:33:32 (GMT) |
commit | 3f4e0839c48480b0cb3396ddbcadef25e69854ee (patch) | |
tree | 58c0aeaa4804ab2685d0e0c1db5e2295089d99ef /Help/release | |
parent | 1e364201e6738a34d39a9522c050768b7ad88559 (diff) | |
download | CMake-3f4e0839c48480b0cb3396ddbcadef25e69854ee.zip CMake-3f4e0839c48480b0cb3396ddbcadef25e69854ee.tar.gz CMake-3f4e0839c48480b0cb3396ddbcadef25e69854ee.tar.bz2 |
clang-tidy: Don't append compiler commands if using -p
When the -p option is given to clang-tidy, it doesn't need the compile
command line to be appended. It can get everything it needs from the
compile_commands.json file in the directory specified with the -p option.
When the compiler being used is not the system default compiler,
clang-tidy has been observed to pick up the wrong headers when the
compiler command line is given, but not if only the -p option is used.
Therefore, don't append the compiler command line if -p is present in
the <LANG>_CLANG_TIDY target property.
Fixes: #24017
Diffstat (limited to 'Help/release')
-rw-r--r-- | Help/release/dev/clang-tidy-prefer-p-option.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Help/release/dev/clang-tidy-prefer-p-option.rst b/Help/release/dev/clang-tidy-prefer-p-option.rst new file mode 100644 index 0000000..816c7dd --- /dev/null +++ b/Help/release/dev/clang-tidy-prefer-p-option.rst @@ -0,0 +1,5 @@ +clang-tidy-prefer-p-option +-------------------------- + +* If :prop_tgt:`<LANG>_CLANG_TIDY` includes a ``-p`` argument, the + full compiler command line is no longer appended after ``--``. |