From a0a18595251b3ae766e12770b4b4a83d080bb7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Aragone=CC=81s?= Date: Wed, 28 Apr 2021 15:08:13 +0200 Subject: [PATCH] Remove recent MacOs clang warning while compiling --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 457c6af..7379e41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,8 +138,11 @@ if(NOT MSVC) #-------------------------------------- add_compile_options("$<$:-g>") add_compile_options("$,-O0,-O2>") - - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function -Wno-implicit-fallthrough -Wno-cast-function-type") + if(APPLE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function -Wno-implicit-fallthrough") + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function -Wno-implicit-fallthrough -Wno-cast-function-type") + endif() set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_OBJC_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_OBJCXX_FLAGS "${CMAKE_CXX_FLAGS}")