Jelajahi Sumber

Use -Wno-deprecated-declarations on apple platforms

Adrian 2 bulan lalu
induk
melakukan
670e4d2ae6
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      CMakeLists.txt

+ 4 - 0
CMakeLists.txt

@@ -640,6 +640,10 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
     if(COMPILER_SUPPORTS_WNO_ERROR_DEPRECATED_DECLARATIONS)
       sdl_compile_options(PRIVATE "-Wno-error=deprecated-declarations")
     endif()
+    check_c_compiler_flag(-Wno-deprecated-declarations COMPILER_SUPPORTS_WNO_DEPRECATED_DECLARATIONS)
+    if(COMPILER_SUPPORTS_WNO_DEPRECATED_DECLARATIONS)
+      sdl_compile_options(PRIVATE "-Wno-deprecated-declarations")
+    endif()
   endif()
 
   if(APPLE)