lairworks / nas2d-core

NAS2D is an open source, object oriented 2D game development framework written in portable C++.
http://nas2d.lairworks.com
zlib License
10 stars 5 forks source link

Refactor MSVC project files #1099

Closed DanRStevens closed 1 year ago

DanRStevens commented 1 year ago

Noticed a few things about the project files that could be improved:

DanRStevens commented 1 year ago

Note that enabling Code Analysis currently shows errors in Google Test code. Considering we've disabled error reporting in external code (angle bracket #include <>), and we've used proper external includes for Google Test, this would seem to be a compiler error in reporting of those warnings.

Potentially we can disable those specific warnings for the test project using a <NOWARN> a property, as illustrated in the documentation: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-suppress-compiler-warnings?view=vs-2022

<NoWarn>40059,42024</NoWarn>

Code Analysis can be enabled on the command line with msbuild by passing the argument /property:RunCodeAnalysis=true. Additionally, it seems there is a project file property set to enable Code Analysis, but currently only for the core NAS2D project (<RunCodeAnalysis>true</RunCodeAnalysis>).