From cb3447c07885e7b2abf233b9e9589aa0276f640b Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Sun, 19 Jun 2022 20:42:51 -0400 Subject: [PATCH] Correct logic for -Wno-unknown-warning-option (#58523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Correct logic for -Wno-unknown-warning-option It looks like both AppleClang and LLVM Clang use -Wno-unknown-warning-option instead of -Wno-unknown-warning, so this updates the logic from b1e5ada to match that. It'd probably also be possible to just add both -Wno-unknown-warning and -Wno-unknown-warning-option, but who knows. * Quote in if condition of CMakeLists.txt Co-authored-by: Jianxiang Wang (王健翔) Co-authored-by: Jianxiang Wang (王健翔) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef7a0ee3f8d69..914a737713398 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,7 +226,7 @@ else () -Wsuggest-override \ -Wunused-macros \ -Wzero-as-null-pointer-constant") - if(Clang STREQUAL ${CMAKE_CXX_COMPILER_ID}) + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CATA_WARNINGS "${CATA_WARNINGS} -Wno-unknown-warning-option") else() set(CATA_WARNINGS "${CATA_WARNINGS} -Wno-unknown-warning")