GCC 6 warns about unused attributes - disable the warning

This commit is contained in:
Matthew Barr 2016-07-19 09:23:57 +10:00
parent 85e2ba7555
commit e3c9bc7edf

View File

@ -317,6 +317,11 @@ if (CXX_UNUSED_CONST_VAR)
set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-unused-const-variable") set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-unused-const-variable")
endif() endif()
# gcc 6 complains about type attributes that get ignored, like alignment
CHECK_CXX_COMPILER_FLAG("-Wignored-attributes" CXX_IGNORED_ATTR)
if (CXX_IGNORED_ATTR)
set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-ignored-attributes")
endif()
# note this for later # note this for later
# g++ doesn't have this flag but clang does # g++ doesn't have this flag but clang does