summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-02-04 11:26:28 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-07 12:23:40 (GMT)
commite62a5f55b1c77b2b610367c82dd59f0cad270438 (patch)
tree6066ffe88fb90d79b172a66c4aaf76f0fe871e6b /qmake
parent763f8e4861108a55fafe267f3e36c2ed222b3271 (diff)
downloadQt-e62a5f55b1c77b2b610367c82dd59f0cad270438.zip
Qt-e62a5f55b1c77b2b610367c82dd59f0cad270438.tar.gz
Qt-e62a5f55b1c77b2b610367c82dd59f0cad270438.tar.bz2
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 ae237e7..af475d0 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;