Skip to content

Compatibility fixes for WAF and bear - #11

Open
martin-schwenke wants to merge 2 commits into
kumar8600:masterfrom
martin-schwenke:master
Open

Compatibility fixes for WAF and bear#11
martin-schwenke wants to merge 2 commits into
kumar8600:masterfrom
martin-schwenke:master

Conversation

@martin-schwenke

Copy link
Copy Markdown

Two compatibility fixes that should be backward compatible. The first helps flycheck-clangcheck work with build systems, such as WAF, that build in a a subdirectory. The second allows the use of compile_commands.json files created using the bear(1) command.

Some build systems (e.g. WAF) build within a separate build
directory (e.g. bin/default) and filenames passed to the compiler are
relative to that directory.  The current code won't match these
filenames.  Instead, expand the file name in the JSON file relative to
the build directory and compare this result to the source filename.

Signed-off-by: Martin Schwenke <martin@meltin.net>
compile_commands.json files generated by bear(1) contain an
"arguments" element rather than a "command" element.  Use the former
if the latter doesn't exist.

Signed-off-by: Martin Schwenke <martin@meltin.net>
@martin-schwenke

martin-schwenke commented Jun 18, 2019

Copy link
Copy Markdown
Author

Note that one of these commits is a simpler duplicate of #10. I only just noticed this...

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.

1 participant