summaryrefslogtreecommitdiff
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-02-04 12:26:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-07 13:23:40 +0100
commite62a5f55b1c77b2b610367c82dd59f0cad270438 (patch)
tree6066ffe88fb90d79b172a66c4aaf76f0fe871e6b /qmake
parent763f8e4861108a55fafe267f3e36c2ed222b3271 (diff)
downloadqt4-tools-e62a5f55b1c77b2b610367c82dd59f0cad270438.tar.gz
qmake/MSVC: fix parsing of the /openmp option
Task-number: QTBUG-29143 Change-Id: I6b1ce0babf51701fa404b821b22060a87c4f46b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from commit be8c47b1404257e33d6b7866101167726a3d1c30) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index ae237e7cd2..af475d067c 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1080,11 +1080,20 @@ bool VCCLCompilerTool::parseOption(const char* option)
}
found = false; break;
case 'o':
- if (second == 'p' && third == 'e' && fourth == 'n') {
- OpenMP = _True;
- break;
+ {
+ const char *str = option + 2;
+ const size_t len = strlen(str);
+ if (len >= 5 && len <= 6 && strncmp(str, "penmp", 5) == 0) {
+ if (len == 5) {
+ OpenMP = _True;
+ break;
+ } else if (str[5] == '-') {
+ OpenMP = _False;
+ break;
+ }
}
found = false; break;
+ }
case 's':
if(second == 'h' && third == 'o' && fourth == 'w') {
ShowIncludes = _True;