cmake: don't error on apple when using deprecated declarations

This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2022-10-08 23:41:07 +02:00
1 parent 274ec02581
commit 45da133999
6 files changed
+21 -6

No files matched your search

+7
View File
@@ -123,6 +123,13 @@ if(APPLE)
testnativecocoa.m
testnativex11.c
testutils.c)
cmake_push_check_state(RESET)
check_c_compiler_flag(-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
cmake_pop_check_state()
if(HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
set_property(SOURCE "testnativecocoa.m" APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-error=deprecated-declarations")
endif()
elseif(WINDOWS)
add_executable(testnative testnative.c testnativew32.c testutils.c)
elseif(HAVE_X11)