]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
GCC 6 warns about unused attributes - disable the warning
authorMatthew Barr <matthew.barr@intel.com>
Mon, 18 Jul 2016 23:23:57 +0000 (09:23 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 10 Aug 2016 05:14:07 +0000 (15:14 +1000)
CMakeLists.txt

index 0b86b2c19a27cfa2c597c3108e4285507ae239b2..24061c42059f9d259743224d854bb121823c84cb 100644 (file)
@@ -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