From dc82bfdaf16cc47dba4957a0a26b811eae1f8415 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 11 Oct 2023 19:08:50 +0200 Subject: [PATCH] (macOS) Changed a compiler warning suppression to be enabled by Clang version instead of CPU architecture --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eb7d6bf0..45b38ed6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,7 @@ else() else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros") if(APPLE) - if(CMAKE_SYSTEM_PROCESSOR MATCHES arm) + if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 15.0.0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-utf8") endif() set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2")