cmake: add -Wno-stringop-truncation
Change-Id: I43d9ba731d0feaf8934d2724ff98072df88a902d
This commit is contained in:
@@ -41,6 +41,11 @@ if(IMPLICIT_FALLTHROUGH)
|
|||||||
set(EXTRA_WARNINGS "-Wno-implicit-fallthrough")
|
set(EXTRA_WARNINGS "-Wno-implicit-fallthrough")
|
||||||
endif(IMPLICIT_FALLTHROUGH)
|
endif(IMPLICIT_FALLTHROUGH)
|
||||||
|
|
||||||
|
CHECK_C_COMPILER_FLAG(-Wno-stringop-truncation STRINGOP_TRUNCATION)
|
||||||
|
if(STRINGOP_TRUNCATION)
|
||||||
|
list(APPEND EXTRA_WARNINGS "-Wno-stringop-truncation")
|
||||||
|
endif(STRINGOP_TRUNCATION)
|
||||||
|
|
||||||
# build options
|
# build options
|
||||||
set(CFLAGS_WARNING "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wno-sign-compare" "-Wno-unused-function" ${EXTRA_WARNINGS} CACHE STRING "Warning flags")
|
set(CFLAGS_WARNING "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wno-sign-compare" "-Wno-unused-function" ${EXTRA_WARNINGS} CACHE STRING "Warning flags")
|
||||||
add_compile_options(${CFLAGS_WARNING})
|
add_compile_options(${CFLAGS_WARNING})
|
||||||
|
|||||||
Reference in New Issue
Block a user