Skip to content

Commit

Permalink
Try get rid of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tsjensen committed Sep 28, 2024
1 parent e6825d7 commit f3b4e02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Test project name.
project(boxes_utest LANGUAGES C)

include(CheckCCompilerFlag)
check_c_compiler_flag(-Wno-stringop-overflow HAVE_STRINGOP_OVERFLOW)

# =============================================================================

# Find required packages. If used from Conan, make sure to run "conan install" before.
Expand All @@ -23,6 +26,12 @@ set(SOURCES
main.c
)

if (HAVE_STRINGOP_OVERFLOW)
target_compile_options(${TARGET}
PRIVATE -Wno-stringop-overflow
)
endif (HAVE_STRINGOP_OVERFLOW)

# -----------------------------------------------------------------------------

add_executable(${TARGET}
Expand Down

0 comments on commit f3b4e02

Please sign in to comment.