From 9955a3bb735c482845b8ec4170bb8f3bfe032d66 Mon Sep 17 00:00:00 2001 From: Nikita Nemkin Date: Sun, 16 Feb 2025 14:13:29 +0500 Subject: Help: Clarify EXCLUDE_FROM_DEFAULT_BUILD behavior Note that solution build configurations ignore dependencies, unlike the ALL_BUILD target. Fixes: #12379 --- Help/prop_tgt/EXCLUDE_FROM_ALL.rst | 9 +++++++++ Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst | 18 ++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst index f0200f3..240fcd1 100644 --- a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst +++ b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst @@ -26,3 +26,12 @@ the :manual:`cmake-generator-expressions(7)` manual for available expressions. Only the "Ninja Multi-Config" generator supports a property value that varies by configuration. For all other generators the value of this property must be the same for all configurations. + +See Also +^^^^^^^^ + +* To exclude targets from the whole directory subtree, see the + :prop_dir:`EXCLUDE_FROM_ALL` directory property. + +* To exclude targets from the Visual Studio solution build, use + :prop_tgt:`EXCLUDE_FROM_DEFAULT_BUILD`. diff --git a/Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst b/Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst index 664704b..71b36e8 100644 --- a/Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst +++ b/Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst @@ -1,8 +1,18 @@ EXCLUDE_FROM_DEFAULT_BUILD -------------------------- -Exclude target from ``Build Solution``. +Exclude a target from the solution build configuration. -This property is only used by Visual Studio generators. -When set to ``TRUE``, the target will not be built when you press -``Build Solution``. +This property is only used by Visual Studio generators. When set to ``TRUE``, +the target will be excluded from the build when the "Build Solution" command +is run. + +This property has a per-configuration version: +:prop_tgt:`EXCLUDE_FROM_DEFAULT_BUILD_`. + +.. note:: + Solution build configurations do not take project dependencies into account. + If a target is excluded, it will not be built, even if another target + included in the configuration depends on it. This behavior differs from the + CMake-generated ``ALL_BUILD`` target and the :prop_tgt:`EXCLUDE_FROM_ALL` + property. -- cgit v0.12