summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
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;