From f23f831e91424afe564573ef00b31984bcde6ec3 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Fri, 6 May 2022 15:21:54 +0200 Subject: [PATCH] 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. --- source/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ffc4d37f622..d0592e9a405 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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)