diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-10-28 14:18:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-28 14:18:07 -0700 |
| commit | 09a647a5261e981cbbc8219292c838490ed0b06f (patch) | |
| tree | 9d18df2f364a3d2bbaa156d76f5d265fc442c2f3 /toolsrc/src | |
| parent | ead8d6bad477f0b075f31097673c3e440356cd3b (diff) | |
| download | vcpkg-09a647a5261e981cbbc8219292c838490ed0b06f.tar.gz vcpkg-09a647a5261e981cbbc8219292c838490ed0b06f.zip | |
Delete use of vcpkg_test_cmake and vcpkg_common_functions. (#13065)
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/build.cpp | 6 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/commands.ci.cpp | 4 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/install.cpp | 10 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 |
4 files changed, 19 insertions, 10 deletions
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7eaaf6aad..c517750d8 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -611,6 +611,12 @@ namespace vcpkg::Build {"FEATURES", Strings::join(";", action.feature_list)}, {"ALL_FEATURES", all_features}, }; + + if (action.build_options.backcompat_features == BackcompatFeatures::PROHIBIT) + { + variables.emplace_back("_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES", "1"); + } + get_generic_cmake_build_args( paths, triplet, diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index de3c522f8..7741b55e8 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -342,7 +342,7 @@ namespace vcpkg::Commands::CI auto emp = ret->default_feature_provider.emplace(p->spec.name(), scfl->clone()); emp.first->second.source_control_file->core_paragraph->default_features = p->feature_list; - p->build_options = vcpkg::Build::default_build_package_options; + p->build_options = vcpkg::Build::backcompat_prohibiting_package_options; } auto precheck_result = binaryprovider.precheck(paths, action); @@ -512,7 +512,7 @@ namespace vcpkg::Commands::CI } else { - action.build_options = vcpkg::Build::default_build_package_options; + action.build_options = vcpkg::Build::backcompat_prohibiting_package_options; } } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index a83c6c976..f916100fa 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -513,8 +513,9 @@ namespace vcpkg::Install static constexpr StringLiteral OPTION_WRITE_PACKAGES_CONFIG = "x-write-nuget-packages-config"; static constexpr StringLiteral OPTION_MANIFEST_NO_DEFAULT_FEATURES = "x-no-default-features"; static constexpr StringLiteral OPTION_MANIFEST_FEATURE = "x-feature"; + static constexpr StringLiteral OPTION_PROHIBIT_BACKCOMPAT_FEATURES = "x-prohibit-backcompat-features"; - static constexpr std::array<CommandSwitch, 9> INSTALL_SWITCHES = {{ + static constexpr std::array<CommandSwitch, 10> INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or 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"}, @@ -522,9 +523,13 @@ namespace vcpkg::Install {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"}, + {OPTION_USE_ARIA2, "Use aria2 to perform download tasks"}, {OPTION_CLEAN_AFTER_BUILD, "Clean buildtrees, packages and downloads after building each package"}, + {OPTION_PROHIBIT_BACKCOMPAT_FEATURES, + "(experimental) Fail install if a package attempts to use a deprecated feature"}, }}; + static constexpr std::array<CommandSwitch, 10> MANIFEST_INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or install"}, {OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"}, @@ -758,6 +763,8 @@ namespace vcpkg::Install const bool clean_after_build = Util::Sets::contains(options.switches, (OPTION_CLEAN_AFTER_BUILD)); const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING) || only_downloads); + const bool prohibit_backcompat_features = + Util::Sets::contains(options.switches, (OPTION_PROHIBIT_BACKCOMPAT_FEATURES)); auto& fs = paths.get_filesystem(); @@ -774,6 +781,7 @@ namespace vcpkg::Install download_tool, Build::PurgeDecompressFailure::NO, Util::Enum::to_enum<Build::Editable>(is_editable), + prohibit_backcompat_features ? Build::BackcompatFeatures::PROHIBIT : Build::BackcompatFeatures::ALLOW, }; PortFileProvider::PathsPortFileProvider provider(paths, args.overlay_ports); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index bd3e208ff..1d4746056 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -416,15 +416,10 @@ If you wish to silence this error and use classic mode, you can: auto& fs = this->get_filesystem(); std::map<std::string, std::string> helpers; auto files = fs.get_files_non_recursive(this->scripts / fs::u8path("cmake")); - auto common_functions = fs::u8path("vcpkg_common_functions"); for (auto&& file : files) { - auto stem = file.stem(); - if (stem != common_functions) - { - helpers.emplace(fs::u8string(stem), - Hash::get_file_hash(VCPKG_LINE_INFO, fs, file, Hash::Algorithm::Sha1)); - } + helpers.emplace(fs::u8string(file.stem()), + Hash::get_file_hash(VCPKG_LINE_INFO, fs, file, Hash::Algorithm::Sha1)); } return helpers; }); |
