Skip to content

Conversation

@jeffdonahue
Copy link
Contributor

This PR addresses #588, allowing you to do make warn to see all the compiler warnings printed during compilation of C files (really anything that your compiler sent to STDERR, which with gcc is nothing unless you have compiler warnings or errors). It's implemented by sending all STDERR output to another file ending with warnings.txt (still printing these warnings immediately after compilation even if you never run make warn) and then concatenating all these warning files into a single summary file afterwards. If your code successfully compiles without any warnings (i.e. the warning summary file is empty) you should see make happily print make: Nothing to be done 'warn' when make warn is run again; otherwise the warnings will be printed every time make warn is run (but without recompiling).

In the second commit, I made lint behave in a similar way, producing a per-file lint report and then concatenating the outputs into a summary lint report. This way lint runs very fast if you run "make lint", change just one source file, and then run "make lint" again -- this is because it's only invoked for the changed file rather than again for the entire codebase.

@shelhamer
Copy link
Member

Sweet, thanks Jeff.

shelhamer added a commit that referenced this pull request Jul 9, 2014
"make warn" to print compilation warnings; "make lint" runs incrementally
@shelhamer shelhamer merged commit 368288e into BVLC:dev Jul 9, 2014
@jeffdonahue jeffdonahue deleted the warnlog branch July 9, 2014 07:29
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
"make warn" to print compilation warnings; "make lint" runs incrementally
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
"make warn" to print compilation warnings; "make lint" runs incrementally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants