Support an array of properties

[target.example.properties]
SOME_LIST = [
    "item1",
    "item2",
]
This commit is contained in:
Duncan Ogilvie
2021-04-26 01:01:14 +02:00
parent 7b7b260379
commit 1cf9240579
2 changed files with 18 additions and 4 deletions
+3 -2
View File
@@ -160,7 +160,8 @@ struct Command {
std::string quote(const std::string &str) {
// Don't quote arguments that don't need quoting
if (str.find(' ') == std::string::npos && str.find('\"') == std::string::npos && str.find('/') == std::string::npos) {
if (str.find(' ') == std::string::npos && str.find('\"') == std::string::npos && str.find('/') == std::string::npos &&
str.find(';') == std::string::npos) {
return str;
}
std::string result;
@@ -442,7 +443,7 @@ int generate_cmake(const char *path, bool root) {
comment("Bootstrap vcpkg");
cmd("include")("${pmm_SOURCE_DIR}/pmm.cmake");
tsl::ordered_map<std::string, std::vector<std::string>> vcpkg_args;
vcpkg_args["REVISION"] = { cmake.vcpkg.version };
vcpkg_args["REVISION"] = {cmake.vcpkg.version};
vcpkg_args["REQUIRES"] = cmake.vcpkg.packages;
auto vcpkg = std::make_pair("VCPKG", vcpkg_args);
cmd("pmm")(vcpkg).endl();