disable Wstringop-truncation for servers

This commit is contained in:
Erik Frojdh
2021-10-11 19:56:39 +02:00
parent 5e672fcd54
commit e84f5bec0b
2 changed files with 16 additions and 0 deletions

10
cmake/SlsAddFlag.cmake Normal file
View File

@ -0,0 +1,10 @@
include(CheckCXXCompilerFlag)
function(sls_add_flag_if_available flag target)
check_cxx_compiler_flag(${flag} flag_supported)
if(flag_supported)
target_compile_options(${target} INTERFACE ${flag})
message("Adding: ${flag} to ${target}")
else()
message("Flag: ${flag} not supported")
endif()
endfunction()