aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index ec6a237..59e8486 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -219,7 +219,7 @@ namespace backend
if(filepath && !containsSourceFile(filePathStr))
{
sourceFiles.emplace_back(filePathStr);
- printf("Adding source file: %s\n", filepath);
+ //printf("Adding source file: %s\n", filepath);
}
}
@@ -229,7 +229,7 @@ namespace backend
if(dir && !containsTestSourceDir(dirStr))
{
testSourceDirs.emplace_back(dirStr);
- printf("Adding test source directory: %s\n", dir);
+ //printf("Using test source directory: %s\n", dir);
}
}
@@ -361,7 +361,6 @@ namespace backend
if(!buildResult)
return buildResult;
}
-
return Result<bool>::Ok(true);
}
@@ -715,11 +714,14 @@ namespace backend
// -Werror
// TODO: Find equivalent -MMD -MP for other compilers than gcc. MMD is used to create "dependency files" -> if headers are modified then source files will be recompiled
// when compiling next time...
- result += " -fpie -MMD -MP '-I" + config.getPackageName() + "@exe' " + cflags + " '-I..' -Wall -Wextra -Werror=return-type -fdiagnostics-show-option '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Winvalid-pch' -fstack-protector " + optimizationFlags;
+ result += " -fpie -MMD -MP '-I" + config.getPackageName() + "@exe' " + cflags + " '-I..'";
+ if(config.showWarnings)
+ result += " -Wall -Wextra -Werror=return-type";
+ else
+ result += " -w";
+ result += " -fdiagnostics-show-option '-fdiagnostics-color=always' '-pipe' '-D_FILE_OFFSET_BITS=64' '-Winvalid-pch' -fstack-protector " + optimizationFlags;
if(sourceFileLanguage == SourceFileLanguage::CPP)
- {
result += " -fexceptions -Wnon-virtual-dtor";
- }
switch (config.getOptimizationLevel())
{
@@ -741,7 +743,11 @@ namespace backend
{
result += " ";
result += optimizationFlags;
- result += " /EHsc /W3 ";
+ result += " /EHs";
+ if(config.showWarnings)
+ result += "/Wall ";
+ else
+ result += "/w ";
result += cflags;
switch (config.getOptimizationLevel())
{
@@ -903,7 +909,7 @@ namespace backend
if (fileOverwriteResult.isErr())
return fileOverwriteResult;
- nprintf(TINYDIR_STRING("Created ninja build file: %s\n"), ninjaBuildFilePath.c_str());
+ //nprintf(TINYDIR_STRING("Created ninja build file: %s\n"), ninjaBuildFilePath.c_str());
Result<bool> buildResult = compile(savePath);
if (!buildResult)