From b3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 24 Sep 2019 11:50:18 -0400 Subject: 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 --- Source/cmGlobalUnixMakefileGenerator3.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx') diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index dac6ea606f..f1a128a833 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -713,7 +713,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( localName, depends, commands, true); // add the all/all dependency - if (!this->IsExcluded(gtarget)) { + if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) { depends.clear(); depends.push_back(localName); commands.clear(); @@ -777,7 +777,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( "Pre-install relink rule for target.", localName, depends, commands, true); - if (!this->IsExcluded(gtarget)) { + if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) { depends.clear(); depends.push_back(localName); commands.clear(); -- cgit v1.2.1