Skip to content

Commit

Permalink
libraries/jpeg: Suppressed fallthrough and shift negative value warni…
Browse files Browse the repository at this point in the history
…ngs.
  • Loading branch information
luis109 committed Nov 26, 2024
1 parent dabda6c commit 6f768a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion vendor/libraries/jpeg/Library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ if(NOT DUNE_SYS_HAS_JPEG)
file(GLOB DUNE_JPEG_FILES
vendor/libraries/jpeg/*.c)

check_cxx_compiler_flag(-Wimplicit-fallthrough=0 _has_wimplicit_fallthrough_0)
if(_has_wimplicit_fallthrough_0)
set(_jpeg_extra_cflags "${_jpeg_extra_cflags} -Wimplicit-fallthrough=0")
endif()

check_cxx_compiler_flag(-Wno-shift-negative-value _has_wno_shift_negative_value)
if(_has_wno_shift_negative_value)
set(_jpeg_extra_cflags "${_jpeg_extra_cflags} -Wno-shift-negative-value")
endif()

set_source_files_properties(${DUNE_JPEG_FILES}
PROPERTIES COMPILE_FLAGS "${DUNE_C_FLAGS}")
PROPERTIES COMPILE_FLAGS "${DUNE_C_FLAGS} ${_jpeg_extra_cflags}")

list(APPEND DUNE_VENDOR_FILES ${DUNE_JPEG_FILES})

Expand Down

0 comments on commit 6f768a7

Please sign in to comment.