From 179c5baaa2b24be61f65daad0e4d415914af4c71 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 28 Dec 2017 22:55:50 +0100 Subject: Add support for tests in a package where type is executable --- src/Conf.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/Conf.cpp') 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& SibsConfig::getDefines() const + { + return defines; + } void SibsConfig::processObject(StringView name) { @@ -495,4 +516,4 @@ namespace sibs { finishedProcessing = true; } -} \ No newline at end of file +} -- cgit v1.2.3