cmGeneratorTarget: Avoid incidental include-what-you-use warning

Avoid `warning: Extra tokens on pragma line` from IWYU.
This commit is contained in:
Brad King
2023-04-05 15:46:26 -04:00
parent 850b4d990c
commit 2daba01ddf

View File

@@ -8977,10 +8977,10 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile(
cmGeneratedFileStream fout(filename);
fout.SetCopyIfDifferent(true);
// IWYU pragma: associated allows include what you use to
// The IWYU "associated" pragma tells 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 :)
// one to get IWYU advice for headers.
fout << "#include <" << headerFilename << "> // IWYU pragma: associated\n";
fout.close();