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