]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
gcc-9:disable redundant move check for older compiler versions
authorWang, Xiang W <xiang.w.wang@intel.com>
Thu, 5 Sep 2019 12:16:08 +0000 (08:16 -0400)
committerHong, Yang A <yang.a.hong@intel.com>
Wed, 30 Oct 2019 15:19:32 +0000 (15:19 +0000)
CMakeLists.txt

index 3801f994a6282b6cc70a5e3dbc94f52cff271ea4..610578196ede6d0fe261f57390dd844da73a3177 100644 (file)
@@ -395,6 +395,12 @@ if (CXX_IGNORED_ATTR)
     set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-ignored-attributes")
 endif()
 
+# gcc 9 complains about redundant move for returned variable
+CHECK_CXX_COMPILER_FLAG("-Wredundant-move" CXX_REDUNDANT_MOVE)
+if (CXX_REDUNDANT_MOVE)
+    set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-redundant-move")
+endif()
+
 # note this for later
 # g++ doesn't have this flag but clang does
 CHECK_CXX_COMPILER_FLAG("-Wweak-vtables" CXX_WEAK_VTABLES)