Suppress -Wdeprecated-declarations for macOS (#1627)
Xcode 14 deprecated functions such as `sprintf` which is used in many places. As an immediate fix for the pre-commit checks, disable deprecated function warnings when building for macOS. Contributes to https://github.com/KhronosGroup/OpenCL-CTS/issues/1626 Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
parent
afdd8b0058
commit
9eec8f3352
1 changed files with 6 additions and 0 deletions
|
|
@ -126,6 +126,12 @@ macro(set_gnulike_module_compile_flags flags)
|
|||
endif()
|
||||
endmacro(set_gnulike_module_compile_flags)
|
||||
|
||||
# Xcode 14.1 deprecated functions such as sprintf.
|
||||
# Suppress such warnings for now, see Issue #1626
|
||||
if(APPLE)
|
||||
add_cxx_flag_if_supported(-Wno-deprecated-declarations)
|
||||
endif(APPLE)
|
||||
|
||||
if(MSVC)
|
||||
# Don't warn when using standard non-secure functions.
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
|
|
|
|||
Loading…
Reference in a new issue