summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorClausKlein <claus.klein@arcormail.de>2024-04-07 08:38:16 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-08 23:15:21 (GMT)
commiteb66549c7cd680f288e58876e0f566f1cc7f2f20 (patch)
treecfd102492f05e84c58b65b2b7fee6be1f6e880d1 /Source/cmGeneratorTarget.cxx
parentb0773aa4f62fe66f966e7ccd0c5c380d13a71fbb (diff)
downloadCMake-eb66549c7cd680f288e58876e0f566f1cc7f2f20.zip
CMake-eb66549c7cd680f288e58876e0f566f1cc7f2f20.tar.gz
CMake-eb66549c7cd680f288e58876e0f566f1cc7f2f20.tar.bz2
VERIFY_INTERFACE_HEADER_SETS: Suppress clang-tidy include checks
`clang-tidy-17` adds include checks similar to IWYU. Suppress them in generated code.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 35992f6..2ec1a29 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -9194,8 +9194,10 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile(
// consider the headerFile as part of the entire language
// unit within include-what-you-use and as a result allows
// one to get IWYU advice for headers.
- fout << "#include <" << headerFilename
- << "> /* IWYU pragma: associated */\n";
+ // Also suppress clang-tidy include checks in generated code.
+ fout
+ << "/* NOLINTNEXTLINE(misc-header-include-cycle,misc-include-cleaner) */\n"
+ << "#include <" << headerFilename << "> /* IWYU pragma: associated */\n";
fout.close();
return filename;