[Qbs] Tighter clang tooling integration

Christian Gagneraud chgans at gmail.com
Tue Nov 21 06:01:32 CET 2017


Hi,

Qbs can generate a clang compilation database.
Some (most) clang-based tools are not multi-cpu aware.

For example a typical use of clang-check is
cd repo.git
qbs generate -g clangdb profile:someprofile # or cmake 
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
find path/to/some/code -name '*.cpp' | xargs clang-check -analyze 
-p=someprofile

There are a few annoying things with this:
- First you need to give clang-check which file you want to check
- clang-check will process all the files one after another, even if you 
have multi CPU
- find path/to/some/code -name '*.cpp' might retun files that should not 
be compiled.

Wouldn't it be nice if we could ask qbs to run a clang-based tools on 
all the source files and with proper load distribution?

Is this something that looks doable? Is it even wanted?

Chris





More information about the Qbs mailing list