From 6772fdd145f2b69da18cdf14a5f93bc935aaf7e9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 30 Dec 2020 12:12:17 -0800 Subject: [vcpkg] Teach `vcpkg install` `--no-build-missing` (#15139) * [vcpkg] Teach `vcpkg install` `--no-build-missing` This switch causes failure to restore from cache to abort the build instead of performing a just-in-time build. This is useful in complex CI systems where the build was expected to have been performed previously, such as via another pipeline. * [vcpkg] Rename flag to require binary caching --- toolsrc/include/vcpkg/build.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 88a12e5c1..bd5188b9f 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -42,6 +42,7 @@ namespace vcpkg::Build FILE_CONFLICTS, CASCADED_DUE_TO_MISSING_DEPENDENCIES, EXCLUDED, + CACHE_MISSING, DOWNLOADED }; @@ -141,8 +142,15 @@ namespace vcpkg::Build PROHIBIT }; + enum class BuildMissing + { + NO = 0, + YES + }; + struct BuildPackageOptions { + BuildMissing build_missing; UseHeadVersion use_head_version; AllowDownloads allow_downloads; OnlyDownloads only_downloads; @@ -156,6 +164,7 @@ namespace vcpkg::Build }; static constexpr BuildPackageOptions default_build_package_options{ + Build::BuildMissing::YES, Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::OnlyDownloads::NO, @@ -169,6 +178,7 @@ namespace vcpkg::Build }; static constexpr BuildPackageOptions backcompat_prohibiting_package_options{ + Build::BuildMissing::YES, Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::OnlyDownloads::NO, -- cgit v1.2.3