diff options
author | Brad King <brad.king@kitware.com> | 2023-12-06 13:51:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-06 13:51:20 (GMT) |
commit | e913ee37f308499b6053d4e422b51e272609772d (patch) | |
tree | 409f6bcdc1a52030b1e2eb91c1655b9623278df5 /Source | |
parent | 0eaad474240fc91af9fa2d38d4590fe974437180 (diff) | |
parent | e9b0dcbbfa51e26f0516c81d7ed3d4051cb539c0 (diff) | |
download | CMake-e913ee37f308499b6053d4e422b51e272609772d.zip CMake-e913ee37f308499b6053d4e422b51e272609772d.tar.gz CMake-e913ee37f308499b6053d4e422b51e272609772d.tar.bz2 |
Merge topic 'fix-cxx-module-transitive-requirements'
e9b0dcbbfa cmCxxModuleMapper: Fix transitive requirements computation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9030
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCxxModuleMapper.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmCxxModuleMapper.cxx b/Source/cmCxxModuleMapper.cxx index e6c10c6..f45c011 100644 --- a/Source/cmCxxModuleMapper.cxx +++ b/Source/cmCxxModuleMapper.cxx @@ -346,13 +346,16 @@ std::set<std::string> CxxModuleUsageSeed( // Add the direct usage. this_usages.insert(r.LogicalName); - // Add the transitive usage. - if (transitive_usages != usages.Usage.end()) { + if (transitive_usages == usages.Usage.end() || + internal_usages.find(r.LogicalName) != internal_usages.end()) { + // Mark that we need to update transitive usages later. + if (bmi_loc.IsKnown()) { + internal_usages[p.LogicalName].insert(r.LogicalName); + } + } else { + // Add the transitive usage. this_usages.insert(transitive_usages->second.begin(), transitive_usages->second.end()); - } else if (bmi_loc.IsKnown()) { - // Mark that we need to update transitive usages later. - internal_usages[p.LogicalName].insert(r.LogicalName); } } |