mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -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);
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user