Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/external_dependencies/cpr/cmake/clang-tidy.cmake
2024-09-24 14:54:57 +02:00

14 lines
485 B
CMake

if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy)
mark_as_advanced(CLANG_TIDY_EXECUTABLE)
if (${CLANG_TIDY_EXECUTABLE})
message(FATAL_ERROR "Clang-tidy not found")
else()
message(STATUS "Enabling clang-tidy")
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-warnings-as-errors=*")
endif()
else()
message(FATAL_ERROR "Clang-tidy is not supported when building for windows")
endif()