summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-01-11 20:22:14 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2023-01-13 14:29:37 +0100
commit0e3ef4111271761ede6cbbeb3b0fa075a483085e (patch)
tree4c319cceff269692bbf4ce18d021fadef65664cc /qmake/generators
parent51272017a7a4ba29a1bd1af093422778d0c51a58 (diff)
Set GenerateDebugInformation to true in vcproj if at least /DEBUG is set
If the command line option contains /DEBUG without the following argument, GenerateDebugInformation remained 'false' because the DebugInfoOption contained the initial value. Set GenerateDebugInformation to 'true' if the /DEBUG option is found and reset to 'false' only if option is set to 'none'. Amends commit 6a6b27940d497b29672ff65ff242fe0211603f22. Pick-to: 6.2 6.4 6.5 5.15 Fixes: QTBUG-110068 Change-Id: I792d7335d8b9536d4beed54cabfd70dcf54f09ac Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp3
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 5878686828..b5639c0108 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1478,7 +1478,8 @@ bool VCLinkerTool::parseOption(const char* option)
EnableUAC = _True;
break;
case 0x3389797: // /DEBUG[:{FASTLINK|FULL|NONE}]
- if (config->CompilerVersion >= NET2015) {
+ DebugInfoOption = linkerDebugOptionEnabled;
+ if (config->CompilerVersion >= NET2015 && *(option + 6) == ':') {
const char *str = option + 7;
if (qstricmp(str, "fastlink") == 0)
DebugInfoOption = linkerDebugOptionFastLink;
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index f0869d510f..190d6c727f 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -258,6 +258,7 @@ enum inlineExpansionOption {
};
enum linkerDebugOption {
linkerDebugOptionNone,
+ linkerDebugOptionEnabled, // represents /DEBUG without further options
linkerDebugOptionFastLink,
linkerDebugOptionFull
};