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.cpp33
1 files changed, 23 insertions, 10 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 60e3d7b6ed..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':
@@ -1138,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),