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}")