Skip to content
Merged
2 changes: 1 addition & 1 deletion docs/maintainers/portfile-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions docs/maintainers/vcpkg_fail_port_install.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/cmake/vcpkg_fail_port_install.cmake
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions scripts/templates/portfile.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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@"
Expand Down