From 468e1a340243712eb045fabe796532ca10682b5b Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Mon, 8 Apr 2019 12:44:27 +0200 Subject: 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 --- src/qtprojectlib/ProjectExporter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3