From 509a12eaacd1cc2cbd89e89fd43cd39d1b456976 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Mar 2023 10:45:03 +0100 Subject: [PATCH] Treat -Wunguarded-availability-new as an error This makes it so access to macOS SDK from newer versions than our deployment target can be detected on a buildbot via failed build. Pull Request: https://projects.blender.org/blender/blender/pulls/105595 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ebfd037c5c..86785737b11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1555,6 +1555,9 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") # add_check_c_compiler_flag(C_WARNINGS C_WARN_UNUSED_MACROS -Wunused-macros) # add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros) + add_check_c_compiler_flag(C_WARNINGS C_WARN_ERROR_UNGUARDED_AVAILABILITY_NEW -Werror=unguarded-availability-new) + add_check_c_compiler_flag(CXX_WARNINGS CXX_WARN_ERROR_UNGUARDED_AVAILABILITY_NEW -Werror=unguarded-availability-new) + # --------------------- # Suppress Strict Flags