User Activity

  • Posted a comment on discussion Development on cppcheck

    That seemed to work great (I had to use -isystem rather than -system-include) I can tell CMake to add certain headers to the g++ system path by adding the "SYSTEM" keyword to "target_include_directories". This seems to be a good workaround. Thank you very much for your help

  • Modified a comment on discussion Development on cppcheck

    Sure, I'll give that a go. To clarify, do you mean: cppcheck --project=compile_commands.json -isystem-include path/to/third-party/ or cppcheck --project=compile_commands.json -i path/to/third-party/ ?

  • Modified a comment on discussion Development on cppcheck

    Sure, I'll give that a go. To clarify, do you mean: cppcheck --project=compile_commands.json -isystem-include path/to/third-party/ or cppcheck --project=compile_commands.json -ipath/to/third-party/ ?

  • Posted a comment on discussion Development on cppcheck

    Sure, I'll give that a go. To clarify, do you mean: cppcheck --project=compile_commands.json -isystem-include path/to/third-party/ or cppcheck --project=compile_commands.json -ipath/to/third-party/ ?

  • Posted a comment on discussion Development on cppcheck

    Hi Daniel, Thank you very much for your prompt response. I considered raising a question in the CMake GitLab project, however I realised that this issue is not specific to CMake. For example, other build systems can be configured to generate a compile_commands.json file (e.g. Bazel). The compile_commands.json file can then be used by cppcheck and the same issue would occur - "syntax errors" in 3rd party code would cause cppcheck to fail, therefore the "--suppress" workaround fails. I think your suggestion...

  • Modified a comment on discussion Development on cppcheck

    Hi, I am invoking cppcheck via CMake (https://cmake.org/cmake/help/latest/prop_tgt/LANG_CPPCHECK.html). CMake adds all include paths provided to the compiler (gcc) to the include path list of cppcheck (-I ...). Consequently, cppcheck analyses 3rd party includes. I would like to configure cppcheck to NOT analyse 3rd party includes. I tried adding the 3rd party includes as "-i " arguments, but that did not work. It is stated here that "excludes" are not honoured if they are also "includes". It would...

  • Posted a comment on discussion Development on cppcheck

    Hi, I am invoking cppcheck via CMake (https://cmake.org/cmake/help/latest/prop_tgt/LANG_CPPCHECK.html). CMake adds all include paths provided to the compiler (gcc) to the include path list of cppcheck (-I ...). Consequently, cppcheck analyses 3rd party includes. I would like to configure cppcheck to NOT analyse 3rd party includes. I tried adding the 3rd party includes as "-i " arguments, but that did not work. It is stated here that "excludes" are not honoured if they are also "includes". It would...

View All

Personal Data

Username:
jheaff1
Joined:
2020-11-13 08:57:14

Projects

  • No projects to display.

Personal Tools