Hello,
in a project I use the Boost library. If I now use Cppcheck with a .json-file, he also checks the Boost library, as it is part of the include path. Is there a possibility to exclude the libraries. I use Cppcheck on a Ubuntu 32-bit in the terminal.
The command:
cppcheck --enable=all --dump --force --project=compile_commands.json
that is unfortunate. currently there is no builtin solution.
on ubuntu a quick and simple solution is to use sed to remove the boost include paths. If the path is "/usr/include" you can use:
sed -i 's|-I/usr/include ||' compile_commands.json
I am not sure how to do it best if we want to add some builtin function in Cppcheck.
I created a ticket: http://trac.cppcheck.net/ticket/8118
maybe it's possible to create a builtin function.
Log in to post a comment.
Hello,
in a project I use the Boost library. If I now use Cppcheck with a .json-file, he also checks the Boost library, as it is part of the include path. Is there a possibility to exclude the libraries.
I use Cppcheck on a Ubuntu 32-bit in the terminal.
The command:
Last edit: Markus Runkel 2017-07-10
that is unfortunate. currently there is no builtin solution.
on ubuntu a quick and simple solution is to use sed to remove the boost include paths. If the path is "/usr/include" you can use:
I am not sure how to do it best if we want to add some builtin function in Cppcheck.
I created a ticket:
http://trac.cppcheck.net/ticket/8118
maybe it's possible to create a builtin function.