From 3468d636169479882bf9ff26ac19a00c7c8bc5dd Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 31 Dec 2017 07:44:46 +0100 Subject: Add support for global config --- src/Conf.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') 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")) -- cgit v1.2.3