summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jan Beich2020-04-18 23:26:19 +0000
committerGravatar Jan Beich2020-04-18 23:26:22 +0000
commit1a2df0a5f389643912c4719ac3f379fe8477e575 (patch)
treea33bfa280f385789ae79972dca7a563461069dba
parentMerge pull request #3716 from bunnei/fix-another-impl-fallthrough (diff)
downloadyuzu-1a2df0a5f389643912c4719ac3f379fe8477e575.tar.gz
yuzu-1a2df0a5f389643912c4719ac3f379fe8477e575.tar.xz
yuzu-1a2df0a5f389643912c4719ac3f379fe8477e575.zip
cmake: Silence -Werror=implicit-fallthrough in SDL2 headers
In file included from src/input_common/sdl/sdl_impl.cpp:16: In file included from /usr/local/include/SDL2/SDL.h:32: In file included from /usr/local/include/SDL2/SDL_main.h:25: /usr/local/include/SDL2/SDL_stdinc.h:445:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] case 3: *_p++ = _val; /* fallthrough */ ^ /usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert '[[fallthrough]];' to silence this warning case 3: *_p++ = _val; /* fallthrough */ ^ [[fallthrough]]; /usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert 'break;' to avoid fall-through case 3: *_p++ = _val; /* fallthrough */ ^ break; /usr/local/include/SDL2/SDL_stdinc.h:446:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] case 2: *_p++ = _val; /* fallthrough */ ^ /usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert '[[fallthrough]];' to silence this warning case 2: *_p++ = _val; /* fallthrough */ ^ [[fallthrough]]; /usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert 'break;' to avoid fall-through case 2: *_p++ = _val; /* fallthrough */ ^ break; /usr/local/include/SDL2/SDL_stdinc.h:447:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] case 1: *_p++ = _val; /* fallthrough */ ^ /usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert '[[fallthrough]];' to silence this warning case 1: *_p++ = _val; /* fallthrough */ ^ [[fallthrough]]; /usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert 'break;' to avoid fall-through case 1: *_p++ = _val; /* fallthrough */ ^ break; 3 errors generated.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 467d769a2..c906c5a50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,7 +164,7 @@ if (ENABLE_SDL2)
164 set(SDL2_LIBRARIES "SDL2::SDL2") 164 set(SDL2_LIBRARIES "SDL2::SDL2")
165 endif() 165 endif()
166 166
167 include_directories(${SDL2_INCLUDE_DIRS}) 167 include_directories(SYSTEM ${SDL2_INCLUDE_DIRS})
168 add_library(SDL2 INTERFACE) 168 add_library(SDL2 INTERFACE)
169 target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}") 169 target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}")
170 endif() 170 endif()