There's already /analyze option:
|
-DCMAKE_CXX_FLAGS=/analyze:autolog- ^ |
/analyze:plugin EspXEngine.dll could be added to add C++ Core Guidelines check.
See more: Use the C++ Core Guidelines checkers
As an example #2069 changes can be enforced: https://godbolt.org/z/jfx9dzb1T
It may produce too many warnings that won't b addressed though. These can be suppressed either by ordinary suppression or by [[gsl::suppress(...)]] attribute.