aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-31 07:44:46 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-31 07:45:19 +0100
commit3468d636169479882bf9ff26ac19a00c7c8bc5dd (patch)
treed8260dfbd8cac00b3873132bd35f7ee3de929e8c
parent1d26101f468e93a750339c20c8d104530f04220a (diff)
Add support for global config
-rw-r--r--backend/ninja/Ninja.cpp2
-rw-r--r--src/Conf.cpp20
2 files changed, 20 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index f83835f..b6314f0 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -738,8 +738,6 @@ namespace backend
Result<bool> Ninja::buildTests(const std::string &projectGeneratedBinary, const SibsConfig &config, const _tinydir_char_t *savePath)
{
- printf("build tests!\n");
-
if(testSourceDirs.empty())
return Result<bool>::Ok(true);
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"))