mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 04:32:55 +00:00
03f3ce7bdc
Applied `cmake_format`.
30 lines
729 B
CMake
30 lines
729 B
CMake
# Find Clang tidy
|
|
#
|
|
|
|
if(NOT CLANG_TIDY_BIN_NAME)
|
|
set(CLANG_TIDY_BIN_NAME clang-tidy)
|
|
endif()
|
|
|
|
# if custom path check there first
|
|
if(CLANG_TIDY_ROOT_DIR)
|
|
find_program(CLANG_TIDY_BIN
|
|
NAMES ${CLANG_TIDY_BIN_NAME}
|
|
PATHS "${CLANG_TIDY_ROOT_DIR}"
|
|
NO_DEFAULT_PATH)
|
|
endif()
|
|
|
|
find_program(CLANG_TIDY_BIN NAMES ${CLANG_TIDY_BIN_NAME})
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(CLANG_TIDY DEFAULT_MSG CLANG_TIDY_BIN)
|
|
|
|
mark_as_advanced(CLANG_TIDY_BIN)
|
|
|
|
if(CLANG_TIDY_FOUND)
|
|
# A CMake script to find all source files and setup clang-tidy targets for
|
|
# them
|
|
include(clang-tidy)
|
|
else()
|
|
message("clang-tidy not found. Not setting up tidy targets")
|
|
endif()
|