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

Add a `show-warnings` target to the `makefile` #1096

Closed DanRStevens closed 1 year ago

DanRStevens commented 1 year ago

This automates running the build using Clang with -Weverything, and then grepping the stderr output for warning flag messages, and processing them to be sorted, with duplicates removed.

The -j1 is needed since otherwise output from multiple processes can get interleaved, which would confuse the regex that pulls out the warning flags.

Run a clean before building all to ensure nothing is skipped during a rebuild, which would prevent warning messages from being displayed for those compilation units.

Order of output redirection is important. First stderr must be directed to where stdout is currently pointing, then stdout is redirected to be ignored. We want to process the stderr output only.


Support work for: #528