diff options
author | Brad King <brad.king@kitware.com> | 2022-10-10 14:20:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-10-10 14:21:09 (GMT) |
commit | 450723796017d0f20f8b054d58218d7c4151a88a (patch) | |
tree | 88f46b730091fe56563f832baf1f6cd3c87306d5 /Source | |
parent | 1fea40c85a61d43ba11c40813e5f477d647ab292 (diff) | |
parent | 6942234bf5847a9bba7841727f4f35f80af6e630 (diff) | |
download | CMake-450723796017d0f20f8b054d58218d7c4151a88a.zip CMake-450723796017d0f20f8b054d58218d7c4151a88a.tar.gz CMake-450723796017d0f20f8b054d58218d7c4151a88a.tar.bz2 |
Merge topic 'verify-header-sets-iwyu'
6942234bf5 VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7762
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; |