summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-24 15:50:18 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-30 13:18:20 (GMT)
commitb3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7 (patch)
tree09b98e18bdbd44c02d199db0aec22ea368bf27f9 /Source/cmLocalNinjaGenerator.cxx
parentcf01d3d2bd649ab1157641b3212a360b06db747f (diff)
downloadCMake-b3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7.zip
CMake-b3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7.tar.gz
CMake-b3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7.tar.bz2
Restore "all" target in subdirectories marked EXCLUDE_FROM_ALL
The "all" target in each directory is supposed to have targets from that directory even if the directory itself is marked `EXCLUDE_FROM_ALL` in its parent. This was broken by commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) which made the participation of a target in "all" independent of context. Revert much of the logic change from that commit to restore the old behavior. Then re-implement the behavior intended by the commit to keep its test working. Extend the test to cover the old behavior too. Fixes: #19753
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index c0afc25..69656a2 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -88,7 +88,9 @@ void cmLocalNinjaGenerator::Generate()
if (tg) {
tg->Generate();
// Add the target to "all" if required.
- if (!this->GetGlobalNinjaGenerator()->IsExcluded(target)) {
+ if (!this->GetGlobalNinjaGenerator()->IsExcluded(
+ this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
+ target)) {
this->GetGlobalNinjaGenerator()->AddDependencyToAll(target);
}
delete tg;