diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2023-01-11 20:22:14 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2023-01-13 14:29:37 +0100 |
commit | 0e3ef4111271761ede6cbbeb3b0fa075a483085e (patch) | |
tree | 4c319cceff269692bbf4ce18d021fadef65664cc /qmake/generators | |
parent | 51272017a7a4ba29a1bd1af093422778d0c51a58 (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.cpp | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 1 |
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 }; |