Priority: P3: Somewhat important
Affects Version/s: 2.5.2
Fix Version/s: None
Environment:Visual Studio 2017
When creating a new (non Qt) project using the stock Visual Studio project wizard, it sets up a block of properties for every build configuration in the .vcxproj, for example:
When using the Qt project wizard provided by the Qt VS Tools, it only sets up a subset of these properties:
Note that "UseDebugLibraries", "CharacterSet" and "WholeProgramOptimization" are missing.
This causes various issues:
- "UseDebugLibraries" is used by VS to switch between Debug and Release Runtime Library and Optimization Settings, which doesn't work without this property. The Qt VS Tools work around this issue by explicitly specifying all the individual build settings like "RuntimeLibrary", "Optimization", "DebugInformationFormat", etc.. (which don't match the VS defaults in all cases). It would be much better to just use the default VS behavior by setting "UseDebugLibraries"
- "WholeProgramOptimization" enables Link Time Code Generation for Release Builds. Because this property is missing for Qt projects, LTCG is disabled.
- "CharacterSet" explicitly defines the Windows character set. Not so much of an issue for Qt projects.
These inconsistencies cause various issues when maintaining a large code base with various Qt and non-Qt projects, because every Qt projects differs from all the other non-Qt projects and need to be adjusted manually.
In conclusion: Qt VS Tools should set all the configuration properties just like the VS built-in project wizards do. On the other end, the Qt Wizard should NOT set all the individual, hand-crafted build properties (RuntimeLibrary, DebugInformationFormat, ...) that are currently set to work-around the issue (and conflict with the VS defaults provided by Microsoft property sheets).