diff options
| author | levlam <levlam@telegram.org> | 2022-05-18 16:59:15 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-05-18 16:59:15 +0300 |
| commit | 18cd0dd95eceb4ea6de52ca55fba8ffcaf7da960 (patch) | |
| tree | 9657274adb7389b84470996c89a1c9cf171074c1 /CMake | |
| parent | 1616513c4cae920c05724de3840d58d9661e2ce8 (diff) | |
Workaround GCC 12 false positive warnings.
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/TdSetUpCompiler.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMake/TdSetUpCompiler.cmake b/CMake/TdSetUpCompiler.cmake index 67320174e..728615e27 100644 --- a/CMake/TdSetUpCompiler.cmake +++ b/CMake/TdSetUpCompiler.cmake @@ -145,6 +145,9 @@ function(td_set_up_compiler) # see http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 add_cxx_compiler_flag("-Wno-redundant-move") endif() + if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)) + add_cxx_compiler_flag("-Wno-stringop-overflow") # some false positives + endif() if (CLANG AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)) # https://stackoverflow.com/questions/26744556/warning-returning-a-captured-reference-from-a-lambda add_cxx_compiler_flag("-Wno-return-stack-address") |
