From 8923b75733f2137dc40d605813396da50802bae7 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 22 May 2022 12:20:24 +0200 Subject: [PATCH] Disable link-time LTO-induced warning Couldn't disable it even with gcc diagnostic ignore, since it happens only at linktime --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bc5774d5..73819e1e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,6 +344,7 @@ if(NOT MSVC AND NOT HAIKU) add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wshadow=global) # gcc add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wthread-safety) add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wsuggest-override) + add_linker_flag_if_supported(OUR_FLAGS_LINK -Wno-alloc-size-larger-than) # save.cpp with LTO # add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wdouble-promotion) # Many occurences # add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wnull-dereference) # Many occurences # add_cxx_compiler_flag_if_supported(OUR_FLAGS_OWN -Wuseless-cast) # TODO: Enable for C++ code except gtest