From: Matthew Barr Date: Mon, 18 Jul 2016 23:23:57 +0000 (+1000) Subject: GCC 6 warns about unused attributes - disable the warning X-Git-Tag: v4.3.0^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c9bc7edf33dbbeb124ae7de71d6d1932fea80e;p=thirdparty%2Fvectorscan.git GCC 6 warns about unused attributes - disable the warning --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b86b2c1..24061c42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,11 @@ if (CXX_UNUSED_CONST_VAR) set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-unused-const-variable") 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 # g++ doesn't have this flag but clang does