Makefiles: Count explicitly included targets towards the progress total

A target that is explicitly included (e.g. has explicitly set
EXCLUDE_FROM_ALL to FALSE) needs to be added in directories
that are above the source directory where the target is defined,
so that it gets counted towards ALL.

This affects targets where the **directory** containing the
target is excluded, but the target itself is included; these
are either counted double or not at all in previous CMake versions.

Fixes: #21867
24 jobs for !5866 with issue-21867 in 6 minutes and 23 seconds (queued for 2 seconds)
latest detached
Status Job ID Name Coverage
  Build
manual #5622928
linux docker cmake build manual
build:centos6-x86_64
passed #5622925
linux docker cmake build
build:debian10-iwyu

00:02:18

manual #5622929
linux docker cmake build linux-3.17 manual
build:fedora33-ninja
passed #5622927
linux docker cmake build linux-3.17
build:fedora33-sphinx

00:04:45

passed #5622926
linux docker cmake build linux-3.17
build:fedora33-tidy

00:06:23

manual #5622931
cmake macos shell nonconcurrent xcode-12.4 manual
build:macos-x86_64-makefiles
manual #5622930
cmake macos shell nonconcurrent xcode-12.4 manual
build:macos-x86_64-ninja
manual #5622932
windows cmake shell vs2019 nonconcurrent msvc-19.28 manual
build:windows-vs2019-x64-ninja
 
  Test
created #5622933
linux docker cmake x11 linux-3.17
test:fedora33-ninja
created #5622935
cmake macos shell nonconcurrent xcode-12.4
test:macos-x86_64-makefiles
created #5622934
cmake macos shell nonconcurrent xcode-12.4
test:macos-x86_64-ninja
created #5622936
windows cmake shell vs2019 nonconcurrent msvc-19.28
test:windows-vs2019-x64-ninja
 
  Test Ext
created #5622939
linux docker cmake cuda-rt
test:cuda10.2-nvidia
created #5622937
linux docker cmake build linux-3.17
test:debian10-ninja
created #5622938
linux docker cmake build linux-3.17
test:fedora33-makefiles
created #5622940
linux docker cmake build linux-3.17
test:fedora33-ninja-multi
created #5622941
cmake macos shell concurrent xcode-12.4
test:macos-x86_64-xcode
created #5622942
windows cmake shell vs2019 concurrent msvc-19.28
test:windows-vs2019-x64
 
  External
passed cdash

passed ghostflow-check-master

passed ghostflow-stager

passed cdash

passed cdash

passed ghostflow-stager