aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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;