From 4d44a4d4af2b951216cc33d5ac8ca95eb0cc04c4 Mon Sep 17 00:00:00 2001 From: Leander Schulten Date: Sat, 5 Aug 2023 17:05:15 +0200 Subject: [PATCH 1/2] Add docs for depend-defaults --- vcpkg/reference/vcpkg-json.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vcpkg/reference/vcpkg-json.md b/vcpkg/reference/vcpkg-json.md index 6c3f0b57..3226ae73 100644 --- a/vcpkg/reference/vcpkg-json.md +++ b/vcpkg/reference/vcpkg-json.md @@ -35,6 +35,7 @@ This example demonstrates a manifest for an application using `boost-system`, `c | Name | Required | Type | Description | |------|----------|--------|-------------| | [builtin-baseline](#builtin-baseline) | No | string | Version pins to use when building as top-level | +| [depend-defaults][] | No | bool | Default value for [default-features](#dependency-default-features) of dependencies | | [default-features](#default-features) | No | bool | Require the [features](../users/manifests.md#features) listed as on-by-default | | [dependencies](#dependencies) | No | [Dependency][][] | List of dependencies required to build and use this project | | [description](#description) | Libraries | string or string[] | The project description | @@ -66,6 +67,14 @@ This field indicates the commit of which pr See [versioning](../users/versioning.md#baselines) and [Using registries](../users/registries.md) for more semantic details. +### `"depend-defaults"` + +The default value for the [`"default-features"`](#dependency-default-features) field of dependencies. A boolean. `true` by default. Optional. + +If used at a top-level manifest, this field diables default features for all ports in the dependency tree. If used in a port, this field sets the default value for all dependencies in the port. + +[depend-defaults]: #depend-defaults + ### `"default-features"` The set of features needed for reasonable behavior without additional customization. @@ -293,7 +302,7 @@ Strings are interpreted as an object with _name_ defined to the string value. ### [Dependency][]: `"default-features"` -A boolean indicating that the project depends on the 'on-by-default' features of the dependency. Defaults to `true`. +A boolean indicating that the project depends on the 'on-by-default' features of the dependency. Defaults to `true` if [depend-defaults][] is not set. In most cases, this should be defined to `false` and any needed features should be explicitly depended upon. From 06f299bf925c3c270a97eebd4f157f288d71d4f0 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Sun, 13 Aug 2023 22:17:02 -0700 Subject: [PATCH 2/2] Update vcpkg/reference/vcpkg-json.md --- vcpkg/reference/vcpkg-json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg/reference/vcpkg-json.md b/vcpkg/reference/vcpkg-json.md index 3226ae73..aa4c2ed3 100644 --- a/vcpkg/reference/vcpkg-json.md +++ b/vcpkg/reference/vcpkg-json.md @@ -71,7 +71,7 @@ See [versioning](../users/versioning.md#baselines) and [Using registries](../use The default value for the [`"default-features"`](#dependency-default-features) field of dependencies. A boolean. `true` by default. Optional. -If used at a top-level manifest, this field diables default features for all ports in the dependency tree. If used in a port, this field sets the default value for all dependencies in the port. +Disables [default features](#default-features) for the port's dependencies. If used in the top-level manifest, disables default features for the whole dependency tree. [depend-defaults]: #depend-defaults