summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-08-23 08:47:31 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-08-24 00:28:43 +0200
commit92f4523c8a257fae5331583a023fb9a9f3393ca4 (patch)
tree24157404155f1d6f35ee35fd4c8656189caf4e9a /qmake
parent96ff6e8ebe80215a0d35055c7382bb1cf58fc660 (diff)
Fix classical strcmp misuse in VS project generator
The conditions were wrong, they must compare against zero. Also, use qstricmp to avoid the platform #ifdef. Change-Id: I7e5ef1b9ae8e2e1d3d9ce90a645ee568b370ab57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 68f62c8dda..4c7ad4b291 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1567,21 +1567,12 @@ bool VCLinkerTool::parseOption(const char* option)
const char* str = option+6;
if (*str == 'S')
ShowProgress = linkProgressAll;
-#ifndef Q_OS_WIN
- else if (strncasecmp(str, "pginstrument", 12))
+ else if (qstricmp(str, "pginstrument") == 0)
LinkTimeCodeGeneration = optLTCGInstrument;
- else if (strncasecmp(str, "pgoptimize", 10))
+ else if (qstricmp(str, "pgoptimize") == 0)
LinkTimeCodeGeneration = optLTCGOptimize;
- else if (strncasecmp(str, "pgupdate", 8 ))
+ else if (qstricmp(str, "pgupdate") == 0)
LinkTimeCodeGeneration = optLTCGUpdate;
-#else
- else if (_stricmp(str, "pginstrument"))
- LinkTimeCodeGeneration = optLTCGInstrument;
- else if (_stricmp(str, "pgoptimize"))
- LinkTimeCodeGeneration = optLTCGOptimize;
- else if (_stricmp(str, "pgupdate"))
- LinkTimeCodeGeneration = optLTCGUpdate;
-#endif
}
} else {
AdditionalOptions.append(option);