summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-03-13 13:24:48 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-03-13 16:43:21 +0000
commit70e772079f4943822cc469ef83fb9c43afc36514 (patch)
tree5d29cf38de7709db39ab8330de9cfb1c5c235a18 /qmake
parent16d1ddfc42732afc6ba90df66042c7ff4be348c2 (diff)
Fix parsing of the /utf8 MSVC compiler flag in VS project generator
Adding the /utf8 compiler flag resulted in undefining all preprocessor symbols for VS project files, because the ingenious compiler option parsing logic checked for a 'u' prefix, and "utf8" obviously matched. The /utf8 flag is added to the additional options, because there doesn't seem to be an XML tag for that. Task-number: QTBUG-59431 Change-Id: I762fcdcf6caf0606b40633861e265df5edb4a9c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 60734b4d1b..34975f2b7b 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1153,7 +1153,12 @@ bool VCCLCompilerTool::parseOption(const char* option)
}
found = false; break;
case 'u':
- UndefineAllPreprocessorDefinitions = _True;
+ if (!second)
+ UndefineAllPreprocessorDefinitions = _True;
+ else if (second == 't' && third == 'f' && fourth == '8')
+ AdditionalOptions += option;
+ else
+ found = false;
break;
case 'v':
if(second == 'd' || second == 'm') {