summaryrefslogtreecommitdiffstats
path: root/Utilities/ClangTidyModule/Tests/CMakeLists.txt
blob: a66eaa8d3e7baa3b634b985686f67d37c6599685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
configure_file("${CMake_SOURCE_DIR}/.clang-format" ".clang-format" COPYONLY)

function(add_run_clang_tidy_test check_name)
  add_test(NAME "RunClangTidy.${check_name}" COMMAND ${CMAKE_COMMAND}
    "-DCLANG_TIDY_COMMAND=$<TARGET_FILE:clang-tidy>"
    "-DCLANG_TIDY_MODULE=$<TARGET_FILE:cmake-clang-tidy-module>"
    "-DCHECK_NAME=${check_name}"
    "-DRunClangTidy_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}"
    -P "${CMAKE_CURRENT_SOURCE_DIR}/RunClangTidy.cmake"
    )
endfunction()

add_run_clang_tidy_test(cmake-use-cmstrlen)
add_run_clang_tidy_test(cmake-use-cmsys-fstream)