BlueBrain / hpc-coding-conventions

Apache License 2.0
8 stars 5 forks source link

Run compile commands from the build directory. #101

Closed olupton closed 3 years ago

olupton commented 3 years ago

As reported in https://github.com/BlueBrain/CoreNeuron/issues/548, make clang-format works but ninja 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.