How can I parse make output for compiler warnings?

I am working on a cross-platform C ++ application for Windows, Mac OS X, and Linux. Development is done on Windows, and then gcc compatibility is tested on Mac OS X and Linux. On Windows, we use Visual Studio to compile, and on Linux and Mac OS X we use Makefiles.

Is there a way to filter compiler warnings for each project / module? Most projects have their own Makefile and then call qmake for subprojects. Is it their tool or profile method to collect compiler warnings and errors in such a scenario? Ideally, I would like to have html output with a brief description of the project and a detailed page for actual errors.

+3
source share
1 answer

GCC sends warnings and errors to the standard error (file descriptor 2), while normal output goes to standard output (file descriptor 1). You can redirect warnings or errors to an additional file and analyze the output to generate a report.

$ make 1> log 2> error_log
+3
source

All Articles