summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_objectmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/win32/msvc_objectmodel.cpp')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp39
1 files changed, 29 insertions, 10 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 6fdd2f4bd2..99f69bfa72 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -779,16 +779,14 @@ bool VCCLCompilerTool::parseOption(const char* option)
found = false; break;
case 'R':
if(second == 'T' && third == 'C') {
- if(fourth == '1')
- BasicRuntimeChecks = runtimeBasicCheckAll;
- else if(fourth == 'c')
- SmallerTypeCheck = _True;
- else if(fourth == 's')
- BasicRuntimeChecks = runtimeCheckStackFrame;
- else if(fourth == 'u')
- BasicRuntimeChecks = runtimeCheckUninitVariables;
- else
- found = false; break;
+ int rtc = BasicRuntimeChecks;
+ for (size_t i = 4; option[i]; ++i) {
+ if (!parseRuntimeCheckOption(option[i], &rtc)) {
+ found = false;
+ break;
+ }
+ }
+ BasicRuntimeChecks = static_cast<basicRuntimeCheckOption>(rtc);
}
break;
case 'T':
@@ -1117,6 +1115,12 @@ bool VCCLCompilerTool::parseOption(const char* option)
case 'd':
DisableSpecificWarnings += option+3;
break;
+ case 'e':
+ if (config->CompilerVersion <= NET2008)
+ AdditionalOptions += option;
+ else
+ TreatSpecificWarningsAsErrors += option + 3;
+ break;
default:
AdditionalOptions += option;
}
@@ -1132,6 +1136,21 @@ bool VCCLCompilerTool::parseOption(const char* option)
return true;
}
+bool VCCLCompilerTool::parseRuntimeCheckOption(char c, int *rtc)
+{
+ if (c == '1')
+ *rtc = runtimeBasicCheckAll;
+ else if (c == 'c')
+ SmallerTypeCheck = _True;
+ else if (c == 's')
+ *rtc |= runtimeCheckStackFrame;
+ else if (c == 'u')
+ *rtc |= runtimeCheckUninitVariables;
+ else
+ return false;
+ return true;
+}
+
// VCLinkerTool -----------------------------------------------------
VCLinkerTool::VCLinkerTool()
: DataExecutionPrevention(unset),