aboutsummaryrefslogtreecommitdiff
path: root/include/Conf.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-04 20:07:20 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:58 +0200
commit444b5725b125e5154a571a1542cbb5a7ca58e29b (patch)
tree235669d9a7eac7da9055f5121efc7ac3abdb2dd2 /include/Conf.hpp
parent804a30bffb5b66b3ee58c30fe5641d27b083b6fb (diff)
Fix sanitizers (and tests) by allowing to specify which sanitizer to use. Its not possible to use all of them at the same time
Diffstat (limited to 'include/Conf.hpp')
-rw-r--r--include/Conf.hpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/Conf.hpp b/include/Conf.hpp
index a854552..2ec3148 100644
--- a/include/Conf.hpp
+++ b/include/Conf.hpp
@@ -200,6 +200,15 @@ namespace sibs
bool directoryToIgnore(const FileString &dir, const std::vector<std::string> &ignoreDirList);
bool isProjectNameValid(const std::string &projectName);
+ enum class Sanitize {
+ NONE,
+ ADDRESS,
+ UNDEFINED,
+ LEAK
+ };
+
+ const Sanitize SANITIZE_INVALID = (Sanitize)-1;
+
class SibsConfig : public ConfigCallback
{
public:
@@ -214,7 +223,7 @@ namespace sibs
cVersion(CVersion::C11),
cppVersion(CPPVersion::CPP14),
mainProject(false),
- sanitize(false),
+ sanitize(Sanitize::NONE),
showWarnings(false),
errorOnWarning(false),
zigTestAllFiles(false),
@@ -396,12 +405,12 @@ namespace sibs
this->mainProject = mainProject;
}
- bool getSanitize() const
+ Sanitize getSanitize() const
{
return sanitize;
}
- void setSanitize(bool sanitize)
+ void setSanitize(Sanitize sanitize)
{
this->sanitize = sanitize;
}
@@ -472,7 +481,7 @@ namespace sibs
bool buildTests;
bool finishedProcessing;
bool mainProject;
- bool sanitize;
+ Sanitize sanitize;
};
class SibsTestConfig : public SibsConfig