Skip to content

Commit

Permalink
Merge pull request #6 from coldtobi/fix_older_gcc
Browse files Browse the repository at this point in the history
Wimplicit_fallthrough requires gcc7 or newer, so only enable it there.
  • Loading branch information
sstefani authored Jun 10, 2022
2 parents cb502b8 + 7d8fb9e commit d5ba7df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointe
set(CMAKE_C_FLAGS_LTO "${CMAKE_C_FLAGS_RELEASE} -flto")
set(CMAKE_EXE_LINKER_FLAGS_LTO "${CMAKE_LINKER_FLAGS_RELEASE} -flto")

add_compile_options(-Wall -Wextra -Werror -Werror -Wno-implicit-fallthrough)
add_compile_options(-Wall -Wextra)

if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 7)
add_compile_option(-Wno-implicit-fallthrough)
endif()

if (NOT DISABLE_CLIENT)
SET(C_SRCS
Expand Down

0 comments on commit d5ba7df

Please sign in to comment.