| Summary: | ($warning ...) directives in external makefiles are interpreted as errors | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | John Cortell <john.cortell> |
| Component: | cdt-build | Assignee: | cdt-build-inbox <cdt-build-inbox> |
| Status: | REOPENED --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
John Cortell
Generally speaking, error parser parsing console output won't be able to tell the difference between gcc compiler error messages and arbitrary warnings from makefile like that. I suggest to format your messages in makefile to indicate severity, i.e. $(warning warning: The Redcoats are coming!) or adjust error parser patterns to recognize them in Preferences->C/C++->Build->Settings->[Error Parsers] tab -> select GNU C/C++ Error Parser and add or edit patterns. See also bug 85264. If you have any other suggestions I am listening. *** This bug has been marked as a duplicate of bug 85264 *** Thanks, Andrew. Makes sense. In my head I was starting to wonder how we could even distinguish the output of ($warning) and was starting to write a follow up post when you beat me to it. Qualifying the text of the message is definitely a reasonable solution. You know what, I got an idea how we could do it. We can customize GNU Make Error Parser to check a content type on the file and if it is "Makefile" type then assign 'warning' severity. Here is output on the console for reference: build/GNUmakefile:1: The Redcoats are coming! (In reply to comment #3) > You know what, I got an idea how we could do it. We can customize GNU Make > Error Parser to check a content type on the file and if it is "Makefile" type > then assign 'warning' severity. > Here is output on the console for reference: > > build/GNUmakefile:1: The Redcoats are coming! Do you mean GCCErrorParser? That's what the comments in bug 85264 say is doing the parsing. Regardless, providing a different default behavior for messages with file:linenumber for makefiles sounds reasonable to me. In the end, I will still qualify the messages with {info|warning|error} since $warning is not used exclusively for warning, but also for informational tracing. |