[vcpkg_fail_port_install] Deprecate function (#21489)

* [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>
This commit is contained in:
Jack·Boos·Yu 2022-02-04 05:04:55 +08:00 committed by GitHub
parent 3e13256799
commit dd7550b0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -33,7 +33,7 @@
- [vcpkg\_execute\_required\_process\_repeat](vcpkg_execute_required_process_repeat.md)
- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md)
- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md)
- [vcpkg\_fail\_port\_install](vcpkg_fail_port_install.md)
- [vcpkg\_fail\_port\_install](vcpkg_fail_port_install.md) (deprecated)
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
- [vcpkg\_find\_fortran](vcpkg_find_fortran.md)
- [vcpkg\_fixup\_cmake\_targets](vcpkg_fixup_cmake_targets.md) (deprecated, use [vcpkg\_cmake\_config\_fixup](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md))

View File

@ -1,5 +1,7 @@
# 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

View File

@ -1,3 +1,5 @@
# DEPRECATED: in favor of the `supports` field in [`manifest file`](manifest-files.md#supports) et al.
#[===[.md:
# vcpkg_fail_port_install
@ -40,6 +42,8 @@ Library linkage for which the build should fail early.
#]===]
function(vcpkg_fail_port_install)
message("${Z_VCPKG_BACKCOMPAT_MESSAGE_LEVEL}" "vcpkg_fail_port_install has been removed and all values should be moved by adding `supports` field to manifest file or directly adding `${PORT}:${FAILED_TRIPLET}=fail` to _scripts/ci.baseline.txt_.\nPlease remove `vcpkg_fail_port_install(...)`.\n")
set(multi_args "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE")
cmake_parse_arguments(PARSE_ARGV 0 "arg" "ALWAYS" "MESSAGE" "${multi_args}")
if(DEFINED arg_UNPARSED_ARGUMENTS)

View File

@ -29,9 +29,6 @@
#
# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md
# # Specifies if the port install should fail immediately given a condition
# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows")
vcpkg_download_distfile(ARCHIVE
URLS "@URL@"
FILENAME "@FILENAME@"