From 5ff3a99f28b7c3bee3c597219690aa587b0768f1 Mon Sep 17 00:00:00 2001 From: Nikolay Bogoychev Date: Tue, 17 May 2022 09:41:17 +0100 Subject: A temporary workaround for gcc 12.1 (#104) Bit of a hack but gcc 12.1 seems to warn on its own headers. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9f78fa..11d613e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,13 @@ else() endif() endif() +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # GCC 12.1 erroneously detects a bunch unitialised values + if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 12.1) + add_compile_options(-Wno-uninitialized -Wno-maybe-uninitialized) + endif() +endif() + # Check if compiler supports AVX2 (this should only catch emscripten) try_compile(INTGEMM_COMPILER_SUPPORTS_AVX2 ${CMAKE_CURRENT_BINARY_DIR}/compile_tests -- cgit v1.2.3