Try get rid of warnings

This commit is contained in:
Thomas Jensen 2023-11-10 21:41:23 +01:00
parent e6825d7eb5
commit f3b4e020e1
No known key found for this signature in database
GPG Key ID: A4ACEE270D0FB7DB

View File

@ -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.
@ -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}