CMake: disable Clang deprecations (`sprintf()') on sanitize

README: Copyright 2022 -> 2023
github: try gcc-12 for 32-bit Ubuntu
This commit is contained in:
gitlost 2023-06-12 13:42:15 +01:00
parent 607e4ed33a
commit 9a5bcdacee
3 changed files with 8 additions and 1 deletions

View file

@ -92,6 +92,10 @@ if(ZINT_SANITIZE)
# Gives warning on MainWindow::setupUI() and retries (& takes forever) if var-tracking-assignments enabled
add_compile_options(-fno-var-tracking-assignments)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Recent clangs added deprecation warnings for `sprintf()` that are only triggered on sanitize - suppress
add_compile_options(-W-no-deprecated-declarations)
endif()
endif()
endif()