Răsfoiți Sursa

Disable unused local typedefs warning

This triggers on gcc 4.8.4 for compile time asserts inside of functions

Fixes https://github.com/libsdl-org/SDL/issues/7732
Sam Lantinga 1 an în urmă
părinte
comite
65180804c4
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      CMakeLists.txt

+ 5 - 0
CMakeLists.txt

@@ -675,6 +675,11 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
     target_compile_options(sdl-global-options INTERFACE "-Wshadow")
   endif()
 
+  check_c_compiler_flag(-Wunused-local-typedefs HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS)
+  if(HAVE_GCC_WUNUSED_LOCAL_TYPEDEFS)
+    target_compile_options(sdl-global-options INTERFACE "-Wno-unused-local-typedefs")
+  endif()
+
   if(APPLE)
     cmake_push_check_state()
     # FIXME: don't use deprecated declarations