diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-03-03 19:18:37 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-03-03 20:15:13 (GMT) |
commit | 081c4679f7d427aa6d7fd4e9959c7850c169e2c7 (patch) | |
tree | bad71b2cfe93712db6142e32523f0b7f1debc521 /Source | |
parent | d1cb554c99c73e1486fbf4e09125337a7c0e9ea3 (diff) | |
download | CMake-081c4679f7d427aa6d7fd4e9959c7850c169e2c7.zip CMake-081c4679f7d427aa6d7fd4e9959c7850c169e2c7.tar.gz CMake-081c4679f7d427aa6d7fd4e9959c7850c169e2c7.tar.bz2 |
Ninja Multi-Config: Don't build target dependencies for custom commands
If cross-config mode is used, and a target depends on another target
as well as a custom command, we don't want the custom command to also
depend on the depended target, as that would build targets unnecessarily.
Fix this behavior.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5243c36..4826a06 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1178,7 +1178,8 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure( cmNinjaOuts this_outs; // this will be the new cache entry for (auto const& dep_target : this->GetTargetDirectDepends(target)) { - if (dep_target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + if (dep_target->GetType() == cmStateEnums::INTERFACE_LIBRARY || + (this->EnableCrossConfigBuild() && !dep_target.IsCross())) { continue; } |