aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index f4beeb8..456eb27 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -122,6 +122,7 @@ namespace backend
case CVersion::C89: return { ninja::NinjaArg("-std=c89"), ninja::NinjaArg("-pedantic") };
case CVersion::C99: return { ninja::NinjaArg("-std=c99"), ninja::NinjaArg("-pedantic") };
case CVersion::C11: return { ninja::NinjaArg("-std=c11"), ninja::NinjaArg("-pedantic") };
+ case CVersion::C20: return { ninja::NinjaArg("-std=c20"), ninja::NinjaArg("-pedantic") };
}
break;
}
@@ -147,9 +148,12 @@ namespace backend
{
switch(cppVersion)
{
+ case CPPVersion::CPP03: return { ninja::NinjaArg("-std=c++03"), ninja::NinjaArg("-pedantic") };
+ case CPPVersion::CPP98: return { ninja::NinjaArg("-std=c++98"), ninja::NinjaArg("-pedantic") };
case CPPVersion::CPP11: return { ninja::NinjaArg("-std=c++11"), ninja::NinjaArg("-pedantic") };
case CPPVersion::CPP14: return { ninja::NinjaArg("-std=c++14"), ninja::NinjaArg("-pedantic") };
case CPPVersion::CPP17: return { ninja::NinjaArg("-std=c++17"), ninja::NinjaArg("-pedantic") };
+ case CPPVersion::CPP20: return { ninja::NinjaArg("-std=c++20"), ninja::NinjaArg("-pedantic") };
}
break;
}
@@ -158,9 +162,12 @@ namespace backend
switch(cppVersion)
{
// Use /Za flag?
+ case CPPVersion::CPP03: return { ninja::NinjaArg("/std:c++03") };
+ case CPPVersion::CPP98: return { ninja::NinjaArg("/std:c++98") };
case CPPVersion::CPP11: return { ninja::NinjaArg("/std:c++11") };
case CPPVersion::CPP14: return { ninja::NinjaArg("/std:c++14") };
case CPPVersion::CPP17: return { ninja::NinjaArg("/std:c++17") };
+ case CPPVersion::CPP20: return { ninja::NinjaArg("/std:c++20") };
}
break;
}
@@ -1006,7 +1013,7 @@ namespace backend
compileCppCommand = compileCCommand;
compileCppCommand.insert(compileCppCommand.end(), {
- ninja::NinjaArg("-fexceptions"),
+ ninja::NinjaArg(config.enableExceptions ? "-fexceptions" : "-fno-exceptions"),
ninja::NinjaArg("-Wnon-virtual-dtor")
});