Notepad2e icon indicating copy to clipboard operation
Notepad2e copied to clipboard

Tune project settings

Open Anton-V-K opened this issue 3 years ago • 1 comments
trafficstars

VS2019 (and other version) shows several warnings when building the application. They are causes by strange/deprecated/incompatible project settings. Here are the examples (for Debug config):

C:\...\v160\Microsoft.CppCommon.targets(241,5): warning MSB8065:
   Custom build for item "src\_version.h" succeeded, but specified output "d:\anton\...\notepad2e\print build time"
   has not been created. This may cause incremental build to work incorrectly.
...
cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
...
BoostRegExSearch.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

Having too many warnings (which are constantly ignored) makes it harder to notice critical warnings.

The first warning related to "src_version.h" is a side-effect of build time generation step (seems to be redundant in Debug config, which isn't distributed). Instead of custom-built "src_version.h" the build time should be updated during the pre-build event, and this should be done only in Release config, because it always triggers the build, so you can't just hit F5 and debug (not a big issue on a modern hardware with SSD).

The seccond warning is related to /Gm (Enable Minimal Rebuild).

The last warning indicates that the Edit-and-Continue feature actually doesn't work (it is quite useful when debugging).

An extra setting which may be enabled for Release config is the generation of debug information in PDB-file, which make it easier to analyse crash dumps of a released version.

The project settings need to be revised to make build process smooth and handy.

Anton-V-K avatar Dec 21 '21 15:12 Anton-V-K

In addition to the above (update: the first post was edited with this suggestion), it was also suggested to enable PDB generation in Release config. This will enable interested users to debug crashes of release and nightly builds in VS. I don't see why we should not do this. @cshnik What do you think?

When done, I will update our build server config to put PDB into generated archives.

ProgerXP avatar Dec 23 '21 12:12 ProgerXP

Fixed.

cshnik avatar Aug 22 '22 14:08 cshnik