mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
cmGeneratorTarget: Avoid incidental include-what-you-use warning
Avoid `warning: Extra tokens on pragma line` from IWYU.
This commit is contained in:
@@ -8977,10 +8977,10 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile(
|
|||||||
|
|
||||||
cmGeneratedFileStream fout(filename);
|
cmGeneratedFileStream fout(filename);
|
||||||
fout.SetCopyIfDifferent(true);
|
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
|
// consider the headerFile as part of the entire language
|
||||||
// unit within include-what-you-use and as a result allows
|
// 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 << "#include <" << headerFilename << "> // IWYU pragma: associated\n";
|
||||||
fout.close();
|
fout.close();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user