aboutsummaryrefslogtreecommitdiff
path: root/src/Conf.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-28 22:55:50 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-28 22:56:34 +0100
commit179c5baaa2b24be61f65daad0e4d415914af4c71 (patch)
treeaff81e8c9b158bfe44789305012aa06ec951b482 /src/Conf.cpp
parent9ffe3db21297192b0f26929e74327487905ad444 (diff)
Add support for tests in a package where type is executable
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r--src/Conf.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index d6aee2c..6d5834e 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -341,6 +341,27 @@ namespace sibs
case OPT_LEV_RELEASE: return "release";
}
}
+
+ bool SibsConfig::isDefined(const std::string &name) const
+ {
+ return defines.find(name) != defines.end();
+ }
+
+ bool SibsConfig::define(const std::string &name, const std::string &value)
+ {
+ if(isDefined(name))
+ return false;
+ else
+ {
+ defines[name] = value;
+ return true;
+ }
+ }
+
+ const std::unordered_map<std::string, std::string>& SibsConfig::getDefines() const
+ {
+ return defines;
+ }
void SibsConfig::processObject(StringView name)
{
@@ -495,4 +516,4 @@ namespace sibs
{
finishedProcessing = true;
}
-} \ No newline at end of file
+}