summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorDaniel Hannon <hello111f@gmail.com>2022-10-07 19:00:28 +0100
committerDaniel Hannon <hello111f@gmail.com>2022-10-07 19:00:28 +0100
commit6942234bf5847a9bba7841727f4f35f80af6e630 (patch)
treeab7d2d8ba6edd5ce846a6ef6a6fdd68d9ba50a54 /Source/cmGeneratorTarget.cxx
parent269652a81468637c03bbdc4ef56e0090ccae78bb (diff)
downloadcmake-6942234bf5847a9bba7841727f4f35f80af6e630.tar.gz
VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 53cb03069a..6195d1ff07 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8760,7 +8760,11 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile(
cmGeneratedFileStream fout(filename);
fout.SetCopyIfDifferent(true);
- fout << "#include <" << headerFilename << ">\n";
+ // IWYU pragma: associated allows include what you use to
+ // 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";
fout.close();
return filename;