aboutsummaryrefslogtreecommitdiff
path: root/src/CmakeModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CmakeModule.cpp')
-rw-r--r--src/CmakeModule.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index 15597cb..27047ba 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -121,6 +121,14 @@ namespace sibs
return createBuildDirResult;
FileString cmd = TINYDIR_STRING("cmake ");
+ if(config.getCompiler() == Compiler::GCC)
+ {
+ if(config.getSanitize())
+ {
+ cmd += TINYDIR_STRING(" \"-CMAKE_C_FLAGS=-fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -lasan -lubsan\" "
+ "\"-CMAKE_CXX_FLAGS=-fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -lasan -lubsan\"");
+ }
+ }
switch(config.getPackageType())
{
case PackageType::EXECUTABLE: