diff options
author | Brad King <brad.king@kitware.com> | 2019-09-24 15:50:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-30 13:18:20 (GMT) |
commit | b3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7 (patch) | |
tree | 09b98e18bdbd44c02d199db0aec22ea368bf27f9 /Help | |
parent | cf01d3d2bd649ab1157641b3212a360b06db747f (diff) | |
download | CMake-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 'Help')
-rw-r--r-- | Help/prop_dir/EXCLUDE_FROM_ALL.rst | 20 | ||||
-rw-r--r-- | Help/prop_tgt/EXCLUDE_FROM_ALL.rst | 16 |
2 files changed, 17 insertions, 19 deletions
diff --git a/Help/prop_dir/EXCLUDE_FROM_ALL.rst b/Help/prop_dir/EXCLUDE_FROM_ALL.rst index 9d3192c..8e3cca0 100644 --- a/Help/prop_dir/EXCLUDE_FROM_ALL.rst +++ b/Help/prop_dir/EXCLUDE_FROM_ALL.rst @@ -1,15 +1,13 @@ EXCLUDE_FROM_ALL ---------------- -Exclude the directory from the all target of its parent. +Set this directory property to a true value on a subdirectory to exclude +its targets from the "all" target of its ancestors. If excluded, running +e.g. ``make`` in the parent directory will not build targets the +subdirectory by default. This does not affect the "all" target of the +subdirectory itself. Running e.g. ``make`` inside the subdirectory will +still build its targets. -A property on a directory that indicates if its targets are excluded -from the default build target. If it is not, then with a Makefile for -example typing make will cause the targets to be built. The same -concept applies to the default build of other generators. - -Targets inherit the :prop_tgt:`EXCLUDE_FROM_ALL` property from the directory -that they are created in. When a directory is excluded, all of its targets will -have :prop_tgt:`EXCLUDE_FROM_ALL` set to ``TRUE``. After creating such a target -you can change its :prop_tgt:`EXCLUDE_FROM_ALL` property to ``FALSE``. This -will cause the target to be included in the default build target. +If the :prop_tgt:`EXCLUDE_FROM_ALL` target property is set on a target +then its value determines whether the target is included in the "all" +target of this directory and its ancestors. diff --git a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst index 0eee297..3aa296d 100644 --- a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst +++ b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst @@ -1,12 +1,15 @@ EXCLUDE_FROM_ALL ---------------- -Exclude the target from the all target. +Set this target property to a true (or false) value to exclude (or include) +the target from the "all" target of the containing directory and its +ancestors. If excluded, running e.g. ``make`` in the containing directory +or its ancestors will not build the target by default. -A property on a target that indicates if the target is excluded from -the default build target. If it is not, then with a Makefile for -example typing make will cause this target to be built. The same -concept applies to the default build of other generators. +If this target property is not set then the target will be included in +the "all" target of the containing directory. Furthermore, it will be +included in the "all" target of its ancestor directories unless the +:prop_dir:`EXCLUDE_FROM_ALL` directory property is set. With ``EXCLUDE_FROM_ALL`` set to false or not set at all, the target will be brought up to date as part of doing a ``make install`` or its @@ -16,6 +19,3 @@ target has undefined behavior. Note that such a target can still safely be listed in an :command:`install(TARGETS)` command as long as the install components the target belongs to are not part of the set of components that anything tries to install. - -This property is enabled by default for targets that are created in -directories that have :prop_dir:`EXCLUDE_FROM_ALL` set to ``TRUE``. |