json project indicates directory: and file: for each compilation unit, so I we should be able to run
$ cppcheck --project=/path/to/bar.json
and do not care of what directory is current for cppcheck now.
However the results of checking may differ for different starting working directory.
Let wrap into json project the command line
$ cd /
host:/$ cppcheck --project=/tmp/R/chkr/bar.json
Checking /tmp/R/bar/part_2/bar.c ...
/tmp/R/include/foo.h:7:0: error: #error Foo was not configured [preprocessorErrorDirective]
# error Foo was not configured
^
json project indicates directory: and file: for each compilation unit, so I we should be able to run
and do not care of what directory is current for cppcheck now.
However the results of checking may differ for different starting working directory.
Let wrap into json project the command line
from [preprocessor includes wrong header files] topic of this forum.
Then
but
hmm I will check..
Thanks! I have created https://trac.cppcheck.net/ticket/10149 for this