Skip to content

Commit

Permalink
[vcpkg] Rename flag to require binary caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Dec 22, 2020
1 parent b5cc2d6 commit 7af5d1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$CurrentTest = "Build Missing tests"

Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--no-build-missing","--x-binarysource=clear;files,$ArchiveRoot,read"))
Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
Throw-IfNotFailed
Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"

Expand All @@ -13,6 +13,6 @@ Throw-IfFailed
Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"

Remove-Item -Recurse -Force $installRoot
Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--no-build-missing","--x-binarysource=clear;files,$ArchiveRoot,read"))
Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
Throw-IfFailed
Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
8 changes: 4 additions & 4 deletions toolsrc/src/vcpkg/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ namespace vcpkg::Install
static constexpr StringLiteral OPTION_DRY_RUN = "dry-run";
static constexpr StringLiteral OPTION_USE_HEAD_VERSION = "head";
static constexpr StringLiteral OPTION_NO_DOWNLOADS = "no-downloads";
static constexpr StringLiteral OPTION_NO_BUILD_MISSING = "no-build-missing";
static constexpr StringLiteral OPTION_ONLY_BINARYCACHING = "only-binarycaching";
static constexpr StringLiteral OPTION_ONLY_DOWNLOADS = "only-downloads";
static constexpr StringLiteral OPTION_RECURSE = "recurse";
static constexpr StringLiteral OPTION_KEEP_GOING = "keep-going";
Expand All @@ -529,7 +529,7 @@ namespace vcpkg::Install
{OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"},
{OPTION_NO_DOWNLOADS, "Do not download new sources"},
{OPTION_ONLY_DOWNLOADS, "Download sources but don't build packages"},
{OPTION_NO_BUILD_MISSING, "Fail if cached binaries are not available"},
{OPTION_ONLY_BINARYCACHING, "Fail if cached binaries are not available"},
{OPTION_RECURSE, "Allow removal of packages as part of installation"},
{OPTION_KEEP_GOING, "Continue installing packages on failure"},
{OPTION_EDITABLE, "Disable source re-extraction and binary caching for libraries on the command line"},
Expand All @@ -544,7 +544,7 @@ namespace vcpkg::Install
{OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"},
{OPTION_NO_DOWNLOADS, "Do not download new sources"},
{OPTION_ONLY_DOWNLOADS, "Download sources but don't build packages"},
{OPTION_NO_BUILD_MISSING, "Fail if cached binaries are not available"},
{OPTION_ONLY_BINARYCACHING, "Fail if cached binaries are not available"},
{OPTION_RECURSE, "Allow removal of packages as part of installation"},
{OPTION_KEEP_GOING, "Continue installing packages on failure"},
{OPTION_EDITABLE, "Disable source re-extraction and binary caching for libraries on the command line"},
Expand Down Expand Up @@ -767,7 +767,7 @@ namespace vcpkg::Install
const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION));
const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS));
const bool only_downloads = Util::Sets::contains(options.switches, (OPTION_ONLY_DOWNLOADS));
const bool no_build_missing = Util::Sets::contains(options.switches, OPTION_NO_BUILD_MISSING);
const bool no_build_missing = Util::Sets::contains(options.switches, OPTION_ONLY_BINARYCACHING);
const bool is_recursive = Util::Sets::contains(options.switches, (OPTION_RECURSE));
const bool is_editable = Util::Sets::contains(options.switches, (OPTION_EDITABLE)) || !args.cmake_args.empty();
const bool use_aria2 = Util::Sets::contains(options.switches, (OPTION_USE_ARIA2));
Expand Down

0 comments on commit 7af5d1f

Please sign in to comment.