# CMake find_package() Module for clang-tidy # # Example usage: # # find_package(ClangTidy) # # If successful the following variables will be defined # CLANGTIDY_FOUND # CLANGTIDY_EXECUTABLE if( ROSA_CLANG_TIDY_PATH STREQUAL "" ) find_program(CLANGTIDY_EXECUTABLE NAMES clang-tidy DOC "Path to clang-tidy executable") else() find_program(CLANGTIDY_EXECUTABLE NAMES clang-tidy PATHS ${ROSA_CLANG_TIDY_PATH} DOC "Path to clang-tidy executable" NO_DEFAULT_PATH) endif() # Handle REQUIRED and QUIET arguments # this will also set CLANGTIDY_FOUND to true if CLANGTIDY_EXECUTABLE exists include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ClangTidy "Failed to locate clang-tidy executable" CLANGTIDY_EXECUTABLE)