From e3c9bc7edf33dbbeb124ae7de71d6d1932fea80e Mon Sep 17 00:00:00 2001 From: Matthew Barr Date: Tue, 19 Jul 2016 09:23:57 +1000 Subject: [PATCH] GCC 6 warns about unused attributes - disable the warning --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) 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