mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-26 05:31:36 +00:00
feat(tidy): build the checks as a clang-tidy plugin
- Add the MODULE library fairmq-tidy-plugin, installed as libfairmq-tidy-checks.so. It adds the fairmq-* checks to a stock clang-tidy of the same LLVM release via --load. - Do not link the LLVM libraries into the plugin: the loading clang-tidy has them. - Run every check test also through the plugin, if a clang-tidy of the found LLVM installation exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,3 +64,19 @@ install(TARGETS ${target}
|
||||
EXPORT ${PROJECT_EXPORT_SET}
|
||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
# libfairmq-tidy-checks: the fairmq-* checks as a plugin for a clang-tidy of
|
||||
# the same LLVM release, e.g. `clang-tidy --load=libfairmq-tidy-checks.so`.
|
||||
# It does not link the LLVM libraries: the clang-tidy executable has them.
|
||||
set(target fairmq-tidy-plugin)
|
||||
add_library(${target} MODULE $<TARGET_OBJECTS:fairmq-tidy-module>)
|
||||
add_library("${PROJECT_NAME}::${target}" ALIAS ${target})
|
||||
set_target_properties(${target} PROPERTIES OUTPUT_NAME fairmq-tidy-checks)
|
||||
if(APPLE)
|
||||
target_link_options(${target} PRIVATE -undefined dynamic_lookup)
|
||||
endif()
|
||||
install(TARGETS ${target}
|
||||
EXPORT ${PROJECT_EXPORT_SET}
|
||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user