cmake: do not require clang-tidy

This commit is contained in:
oxmox 2023-03-11 12:11:27 +01:00
parent b9f045afb8
commit d8907d184b

View file

@ -14,8 +14,11 @@ find_package(Threads)
# some reason pickup log.c and warn about some va_list stuff. Might be because
# log.c is in the source directory as the same does not happen with the imgui
# object library. TODO: move logc to externals.
find_program(CLANG_TIDY_EXECUTABLE clang-tidy)
if (CLANG_TIDY_EXECUTABLE)
set(CMAKE_C_CLANG_TIDY clang-tidy -p ${CMAKE_BINARY_DIR} --extra-arg=-std=c11)
set(CMAKE_CXX_CLANG_TIDY clang-tidy -p ${CMAKE_BINARY_DIR} --extra-arg=-std=c++17)
endif()
add_library(dp_common dp_common.c)
target_compile_features(dp_common PRIVATE c_std_11)