Validate vcpkg features

main
cursey 2 years ago
parent 0acc9b4e5a
commit b4b0f533a9
No known key found for this signature in database
GPG Key ID: A6A7163A1B8FD42C

@ -614,6 +614,11 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
if (!vcpkg_valid_identifier(package.name)) {
throw std::runtime_error("Invalid vcpkg package name '" + package.name + "'");
}
for (const auto &feature : package.features) {
if (!vcpkg_valid_identifier(feature)) {
throw std::runtime_error("Invalid vcpkg package feature '" + feature + "'");
}
}
if (package.features.empty()) {
ofs << " \"" << package.name << '\"';
} else {

Loading…
Cancel
Save