Merge pull request #2719 from Squareys/cmake-all-features

CMake variable for all features
This commit is contained in:
Robert Schumacher 2018-02-03 13:29:08 -08:00 committed by GitHub
commit 6609d3d32e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,6 +290,7 @@ namespace vcpkg::Build
const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet);
std::string features;
std::string all_features;
if (GlobalState::feature_packages)
{
for (auto&& feature : config.feature_list)
@ -300,6 +301,10 @@ namespace vcpkg::Build
{
features.pop_back();
}
for (auto& feature : config.scf.feature_paragraphs)
{
all_features.append(feature->name + ";");
}
}
const Toolset& toolset = paths.get_toolset(pre_build_info);
@ -317,6 +322,7 @@ namespace vcpkg::Build
{"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"},
{"GIT", git_exe_path},
{"FEATURES", features},
{"ALL_FEATURES", all_features},
});
const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset);