Allow users to specify additional individual Co-Compilers
Hello,
currently there is only some choice of __run_co_compile
supported:
--cppcheck=
--cpplint=
--iwyu=
--lwyu=
--tidy=
The huge benefit of those co-compilers is that incremental builds are supported (according tools are only run for changes). If users currently want to integrate their own linting tools, they have to abuse one of the existing co-compiler integrations. For example they might use some "wrapper" script which calls the actual tool plus their individual tool afterwards.
Instead, it would be nice to allow users to integrate the linting tools without any abuse of existing co-compilers.
Therefore I propose to introduce some new co-compiler, e.g. it could be named --individual
or --co-compiler
Since it would be nice to support multiple individual co-compilers, the co-compiler shall just start with according pattern. For example:
__run_co_compile --individual-mylinter1=...
__run_co_compile --individual-formattingtool=...
__run_co_compile --individual-refactoringtool=...
The co-compilers could be enabled within CMakelists.txt
via some property (analog to <LANG>_CLANG_TIDY
):
-
CXX_CO_COMPILERS="mylinter1;formattingtool;refactoringtool"
.
The tool for each co-compiler can be specified via <LANG>_CO_COMPILER_<NAME>
(analog to `HEADER_DIRS_:
CXX_CO_COMPILER_mylinter1=/path/to/mylinter1"
CXX_CO_COMPILER_formattingtool=/path/to/formattingtool"
CXX_CO_COMPILER_refactoringtool=/path/to/refactoringtool"