aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-09-21 10:22:24 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commitbf42a3fe559b53b62db9c6363efbec612804dbe7 (patch)
tree9b499988832a053d7efc275e97f9803b2f5d6f5b /include
parent0415b7bef504b41b43672b3e153bbe260f2cc055 (diff)
Add support for running zig tests
Diffstat (limited to 'include')
-rw-r--r--include/Conf.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/Conf.hpp b/include/Conf.hpp
index 278acf2..951def9 100644
--- a/include/Conf.hpp
+++ b/include/Conf.hpp
@@ -229,7 +229,8 @@ namespace sibs
cppVersion(CPPVersion::CPP14),
mainProject(false),
sanitize(false),
- showWarnings(false)
+ showWarnings(false),
+ zigTestAllFiles(false)
{
cmakeDirGlobal = projectPath;
cmakeDirStatic = cmakeDirGlobal;
@@ -417,12 +418,16 @@ namespace sibs
virtual bool isDefined(const std::string &name) const;
virtual bool define(const std::string &name, const std::string &value);
virtual const std::unordered_map<std::string, std::string>& getDefines() const;
+
+ virtual bool isTest() { return false; }
// Get define value by name.
// Return empty string if the value is empty or if the defined value doesn't exist
const std::string& getDefinedValue(const std::string &name) const;
+ std::vector<FileString> zigTestFiles;
bool showWarnings;
+ bool zigTestAllFiles;
protected:
virtual void processObject(StringView name) override;
virtual void processField(StringView name, const ConfigValue &value) override;
@@ -474,7 +479,7 @@ namespace sibs
class SibsTestConfig : public SibsConfig
{
public:
- SibsTestConfig(Compiler _compiler, const FileString &_projectPath, OptimizationLevel _optimizationLevel) : SibsConfig(_compiler, _projectPath, _optimizationLevel, true)
+ SibsTestConfig(Compiler _compiler, const FileString &_projectPath, OptimizationLevel _optimizationLevel) : SibsConfig(_compiler, _projectPath, _optimizationLevel, false)
{
packageName = "test";
showWarnings = true;
@@ -482,6 +487,8 @@ namespace sibs
virtual ~SibsTestConfig(){}
+ bool isTest() override { return true; }
+
PackageType getPackageType() const override
{
return PackageType::EXECUTABLE;