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.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index b2663e51c9..be7b547115 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -312,6 +312,18 @@ static QString vcCommandSeparator()
return cmdSep;
}
+static void unknownOptionWarning(const char *tool, const char *option)
+{
+ static bool firstCall = true;
+ warn_msg(WarnLogic, "Could not parse %s option '%s'; added to AdditionalOptions.", tool, option);
+ if (firstCall) {
+ firstCall = false;
+ warn_msg(WarnLogic,
+ "You can suppress these warnings with CONFIG+=suppress_vcproj_warnings.");
+ }
+}
+
+
// VCCLCompilerTool -------------------------------------------------
VCCLCompilerTool::VCCLCompilerTool()
: AssemblerOutput(asmListingNone),
@@ -916,6 +928,8 @@ bool VCCLCompilerTool::parseOption(const char* option)
ForceConformanceInForLoopScope = ((*c) == '-' ? _False : _True);
else if(fourth == 'w')
TreatWChar_tAsBuiltInType = ((*c) == '-' ? _False : _True);
+ else if (config->CompilerVersion >= NET2013 && strncmp(option + 4, "strictStrings", 13) == 0)
+ AdditionalOptions += option;
else
found = false;
} else {
@@ -1146,7 +1160,8 @@ bool VCCLCompilerTool::parseOption(const char* option)
break;
}
if(!found) {
- warn_msg(WarnLogic, "Could not parse Compiler option: %s, added as AdditionalOption", option);
+ if (!config->suppressUnknownOptionWarnings)
+ unknownOptionWarning("Compiler", option);
AdditionalOptions += option;
}
return true;
@@ -1741,7 +1756,8 @@ bool VCLinkerTool::parseOption(const char* option)
break;
}
if(!found) {
- warn_msg(WarnLogic, "Could not parse Linker options: %s, added as AdditionalOption", option);
+ if (!config->suppressUnknownOptionWarnings)
+ unknownOptionWarning("Linker", option);
AdditionalOptions += option;
}
return found;