[Bf-blender-cvs] [f23f831e914] master: Clang-tidy: Don't warn about unrecognized compiler flags

Sebastian Parborg noreply at git.blender.org
Fri May 6 15:27:01 CEST 2022


Commit: f23f831e91424afe564573ef00b31984bcde6ec3
Author: Sebastian Parborg
Date:   Fri May 6 15:21:54 2022 +0200
Branches: master
https://developer.blender.org/rBf23f831e91424afe564573ef00b31984bcde6ec3

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.

===================================================================

M	source/CMakeLists.txt

===================================================================

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)



More information about the Bf-blender-cvs mailing list