mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-06 11:22:52 +08:00
dd7550b0fc
* [vcpkg_fail_port_install] Deprecate function * Update doc * Apply suggestions * Revert changes about include this function and delete doc * Apply suggestions * version * Update docs/maintainers/vcpkg_fail_port_install.md Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com> * Update scripts/cmake/vcpkg_fail_port_install.cmake * Update scripts/cmake/vcpkg_fail_port_install.cmake * Use message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" to ensure it works with `--prohibit-backcompat-features`. Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com> Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
46 lines
1.5 KiB
Markdown
46 lines
1.5 KiB
Markdown
# vcpkg_fail_port_install
|
|
|
|
**This function has been deprecated in favor of the `supports` field in [`manifest file`](manifest-files.md#supports) et al.**
|
|
|
|
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fail_port_install.md).
|
|
|
|
Checks common requirements and fails the current portfile with a (default) error message
|
|
|
|
## Usage
|
|
```cmake
|
|
vcpkg_fail_port_install(
|
|
[ALWAYS]
|
|
[MESSAGE <"Reason for failure">]
|
|
[ON_TARGET <Windows> [<OSX> ...]]
|
|
[ON_ARCH <x64> [<arm> ...]]
|
|
[ON_CRT_LINKAGE <static> [<dynamic> ...]])
|
|
[ON_LIBRARY_LINKAGE <static> [<dynamic> ...]]
|
|
)
|
|
```
|
|
|
|
## Parameters
|
|
### MESSAGE
|
|
Additional failure message. If none is given, a default message will be displayed depending on the failure condition.
|
|
|
|
### ALWAYS
|
|
Will always fail early
|
|
|
|
### ON_TARGET
|
|
Targets for which the build should fail early. Valid targets are `<target>` from `VCPKG_IS_TARGET_<target>` (see `vcpkg_common_definitions.cmake`).
|
|
|
|
### ON_ARCH
|
|
Architecture for which the build should fail early.
|
|
|
|
### ON_CRT_LINKAGE
|
|
CRT linkage for which the build should fail early.
|
|
|
|
### ON_LIBRARY_LINKAGE
|
|
Library linkage for which the build should fail early.
|
|
|
|
## Examples
|
|
|
|
* [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake)
|
|
|
|
## Source
|
|
[scripts/cmake/vcpkg\_fail\_port\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fail_port_install.cmake)
|