This seems to be because the formatting script invokes the compiler to figure out which headers are included (it's not immediately clear to me why this is necessary), and with Ninja the include paths are not specified absolutely so it is necessary to run from the build directory.
This patch makes sure the compiler is run from the build directory.
As reported in https://github.com/BlueBrain/CoreNeuron/issues/548,
make clang-format
works butninja clang-format
does not.This seems to be because the formatting script invokes the compiler to figure out which headers are included (it's not immediately clear to me why this is necessary), and with Ninja the include paths are not specified absolutely so it is necessary to run from the build directory.
This patch makes sure the compiler is run from the build directory.