(macOS) Changed a compiler warning suppression to be enabled by Clang version instead of CPU architecture

This commit is contained in:
Leon Styhre 2023-10-11 19:08:50 +02:00
parent 4b32e62990
commit dc82bfdaf1

View file

@ -207,7 +207,7 @@ else()
else() else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros") 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(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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-utf8")
endif() endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2")