aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2019-04-08 12:44:27 +0200
committerMiguel Costa <miguel.costa@qt.io>2019-04-30 08:07:29 +0000
commit468e1a340243712eb045fabe796532ca10682b5b (patch)
tree554b27cea019b32c4ac65d93f3260f7827a11bd3
parent394952eb49978a25d8d8b0c54394acd7fbec48b8 (diff)
Fix linker rule property evaluation
Using the GenerateDebugInformation field of the VCLinkerTool class is restricted to cases where the underlying project property is either set to 'true' or 'false'. With any other value -- namely 'DebugFastLink' or 'DebugFull' -- attempting to get the (bool) value of the field GenerateDebugInformation will generate an exception. This would cause the .pro file export to exclude projects that use non-boolean values for this linker property. For further details: https://social.msdn.microsoft.com/Forums/SECURITY/en-US/ce6aabc6-45d0-44e2-a219-28ecd728924f/vclinkertoolgeneratedebuginformation-property-does-not-support-debugfull-and-debugfastlink?forum=vsx Task-number: QTVSADDINBUG-598 Change-Id: Ia7c5608f89237a0eb5ca3b67e539b1ec67d98996 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/qtprojectlib/ProjectExporter.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qtprojectlib/ProjectExporter.cs b/src/qtprojectlib/ProjectExporter.cs
index fc5ccb54..e70b6060 100644
--- a/src/qtprojectlib/ProjectExporter.cs
+++ b/src/qtprojectlib/ProjectExporter.cs
@@ -192,7 +192,10 @@ namespace QtProjectLib
if (config.ConfigurationType == ConfigurationTypes.typeStaticLibrary)
option.List.Add("staticlib");
if (linker != null) {
- if (linker.GenerateDebugInformation)
+ var linkerRule = linker as IVCRulePropertyStorage;
+ var generateDebugInformation = (linkerRule != null) ?
+ linkerRule.GetUnevaluatedPropertyValue("GenerateDebugInformation") : null;
+ if (generateDebugInformation != "false")
option.List.Add("debug");
else
option.List.Add("release");