Clang-tidy: Don't warn about unrecognized compiler flags
When using GCC, clang-tidy will still use clang under the hood but GCC flags will still be passed. Therefore we will ignore any warnings about unrecognized flags as we don't care about this when running clang-tidy.
This commit is contained in:
@@ -15,8 +15,9 @@ if(WITH_CLANG_TIDY AND NOT MSVC)
|
||||
endif()
|
||||
|
||||
find_package(ClangTidy REQUIRED)
|
||||
set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE})
|
||||
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE})
|
||||
set(CMAKE_C_CLANG_TIDY
|
||||
${CLANG_TIDY_EXECUTABLE};--extra-arg=-Wno-error=unknown-warning-option)
|
||||
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE};--extra-arg=-Wno-error=unknown-warning-option)
|
||||
endif()
|
||||
|
||||
add_subdirectory(blender)
|
||||
|
||||
Reference in New Issue
Block a user