Search code examples
c++cppcheck

use cppcheck without defining all the macros


I use cppcheck on a project using the boost library. The headers in this library contain a huge amount of macro that I don't even use in my sources. Nevertheless, cppcheck explore paths depending on these macros that I think useless. Is there a way to tell cppcheck to ignore all macros unless it's defined in a source code using a #define?


Solution

  • Not exactly what you want, but you can specify define to cppcheck so it evaluates only one branch:

    see -D/-U options.