diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-31 07:44:46 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2017-12-31 07:45:19 +0100 |
commit | 3468d636169479882bf9ff26ac19a00c7c8bc5dd (patch) | |
tree | d8260dfbd8cac00b3873132bd35f7ee3de929e8c /src | |
parent | 1d26101f468e93a750339c20c8d104530f04220a (diff) |
Add support for global config
Diffstat (limited to 'src')
-rw-r--r-- | src/Conf.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp index 032d89f..7bf5bbc 100644 --- a/src/Conf.cpp +++ b/src/Conf.cpp @@ -606,6 +606,26 @@ namespace sibs throw ParserException("Expected package.ignore_dirs to be a list, was a single value"); } } + else if(currentObject.equals("config")) + { + if (name.equals("expose_include_dirs")) + { + if (value.isList()) + { + for (const StringView &includeDir : value.asList()) + { + exposeIncludeDirs.emplace_back(string(includeDir.data, includeDir.size)); + } + } + else + { + string errMsg = "Expected "; + errMsg += string(currentObject.data, currentObject.size); + errMsg += " to be a list, was a single value"; + throw ParserException(errMsg); + } + } + } else if (currentObject.equals(CONFIG_SYSTEM_PLATFORM)) { if (name.equals("expose_include_dirs")) |