diff options
author | Daniel Hannon <hello111f@gmail.com> | 2022-10-07 18:00:28 (GMT) |
---|---|---|
committer | Daniel Hannon <hello111f@gmail.com> | 2022-10-07 18:00:28 (GMT) |
commit | 6942234bf5847a9bba7841727f4f35f80af6e630 (patch) | |
tree | ab7d2d8ba6edd5ce846a6ef6a6fdd68d9ba50a54 /Source | |
parent | 269652a81468637c03bbdc4ef56e0090ccae78bb (diff) | |
download | CMake-6942234bf5847a9bba7841727f4f35f80af6e630.zip CMake-6942234bf5847a9bba7841727f4f35f80af6e630.tar.gz CMake-6942234bf5847a9bba7841727f4f35f80af6e630.tar.bz2 |
VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 53cb030..6195d1f 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; |