[script] add IPO warning flags
@@ -171,6 +171,21 @@ foreach (flag ${WARN_FLAGS_TO_CHECK})
set (WARN_FLAGS "${WARN_FLAGS} ${flag}")
endif()
endforeach()
+
+#Suppress IPO link warnings
+set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
+set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
+ "-Wno-null-dereference"
+ )
+foreach(flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK})
+ CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
+ if(CXX_COMPILER_SUPPORTS_${flag})
+ #Flag supported, so enable it
+ set(IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag}")
+ endif()
+endforeach()
+
+
#
# Sanitizer flags
#
