From f7575880d7a6cc221d712e8e7f8bbeeca18576a6 Mon Sep 17 00:00:00 2001 From: Qrox Date: Tue, 24 Dec 2019 00:13:30 +0800 Subject: [PATCH 1/2] Fix CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09fc85a064f61..435e421c9e24e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,7 +224,7 @@ ELSE() -Woverloaded-virtual \ -Wpedantic") IF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") - SET(CATA_WARNINGS "$(CATA_WARNINGS) -Wsuggest-override") + SET(CATA_WARNINGS "${CATA_WARNINGS} -Wsuggest-override") ENDIF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") # Compact the whitespace in the warning string string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}") From f45f4a698e9db4d37f9445bc7cbcc4cef0314a49 Mon Sep 17 00:00:00 2001 From: Qrox Date: Tue, 24 Dec 2019 00:54:15 +0800 Subject: [PATCH 2/2] Also update clang-tidy Windows instructions The compile database will contain the -Wsuggest-override option when compiled with MinGW-w64, however clang-tidy won't recognize it. This makes clang-tidy ignore such unknown warning options --- doc/DEVELOPER_TOOLING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DEVELOPER_TOOLING.md b/doc/DEVELOPER_TOOLING.md index 3c50ab19cf580..ae2f14f195809 100644 --- a/doc/DEVELOPER_TOOLING.md +++ b/doc/DEVELOPER_TOOLING.md @@ -263,7 +263,7 @@ to avoid compiler errors. python3 /clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \ -clang-tidy-binary=build/tools/clang-tidy-plugin/CataAnalyzerPlugin.exe \ -p=build "\.cpp$" \ - -extra-arg=-target -extra-arg=x86_64-pc-windows-gnu -extra-arg=-pthread -extra-arg=-DSDL_DISABLE_ANALYZE_MACROS \ + -extra-arg=-target -extra-arg=x86_64-pc-windows-gnu -extra-arg=-pthread -extra-arg=-DSDL_DISABLE_ANALYZE_MACROS -extra-arg=-Wno-unknown-warning-option \ -extra-arg=-isystem -extra-arg=/clang/lib/Headers ```