diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index 1c24f8e98c9e92..6c7b87fdc859d9 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -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)) diff --git a/docs/maintainers/vcpkg_fail_port_install.md b/docs/maintainers/vcpkg_fail_port_install.md index f729b19a356891..1d59fd8c1896f8 100644 --- a/docs/maintainers/vcpkg_fail_port_install.md +++ b/docs/maintainers/vcpkg_fail_port_install.md @@ -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 diff --git a/scripts/cmake/vcpkg_fail_port_install.cmake b/scripts/cmake/vcpkg_fail_port_install.cmake index a7e876d0658561..4b760e9a0b4a6a 100644 --- a/scripts/cmake/vcpkg_fail_port_install.cmake +++ b/scripts/cmake/vcpkg_fail_port_install.cmake @@ -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) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 5cd363ddce5935..8679c6104dd7b5 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -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@"