cyy | a6a3a78 | 2019-02-07 22:27:33 +0800 | [diff] [blame] | 1 | find_package(ClangTools QUIET) |
2 | if(clang-tidy_FOUND AND run-clang-tidy_FOUND AND NOT TARGET do_run_clang_tidy) | ||||
3 | add_custom_target( | ||||
4 | do_run_clang_tidy | ||||
5 | COMMAND ClangTools::run-clang-tidy -clang-tidy-binary "$<TARGET_FILE:ClangTools::clang-tidy>" -p ${CMAKE_BINARY_DIR} "-quiet" > ./run-clang-tidy.txt | ||||
6 | DEPENDS ${CMAKE_BINARY_DIR}/compile_commands.json | ||||
7 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||||
8 | ) | ||||
9 | endif() |