diff options
author | Nikolay Bogoychev <nheart@gmail.com> | 2022-05-17 11:41:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 11:41:17 +0300 |
commit | 5ff3a99f28b7c3bee3c597219690aa587b0768f1 (patch) | |
tree | fe2a1b0015c5eb05425e53e69228916908b3fc56 | |
parent | 2d76dbb7268cb7be42c751de45c1dd916fe9a0f0 (diff) |
A temporary workaround for gcc 12.1 (#104)
Bit of a hack but gcc 12.1 seems to warn on its own headers.
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
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 |