cppcheck: refactor cmake configuration
Refactor of the cppcheck cmake configuration to make it usable also for full project builds and not only WorkDir:
- Move the suppressions into their own
cppcheck_suppress.txt
file. Only the suppression of external include directories remains on the command line. - Configure this suppression file and some other general cppcheck options in
CxxUtilsSettings
using the same approach we already do for the gccchecker configuration.
The command line arguments of cppcheck
are built from:
- Fixed command line arguments:
--quiet --inline-suppr --template=gcc -D__CPPCHECK__
that always have to be used. - Suppression rules for all externals.
- Athena-specific
--suppressions-list
(see above) - User-modifiable cppcheck options with default value
ATLAS_CPPCHECK_OPTIONS "--enable=warning,portability"
. These can be modified or augmented viacmake -DATLAS_CPPCHECK_OPTIONS=...
.
As always, in order to enable cppcheck one has to have it available in the environment (e.g. via lsetup cppcheck
).
Relates to ATLINFR-5443 and ATLINFR-5449.
Edited by Frank Winklmeier