From 682d9b3fa0586182a6720048c78c5eaff3d5e779 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 5 Dec 2024 17:46:31 +0100 Subject: [PATCH] GH-44954: [C++][CI] Silence protobuf-generated deprecations --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 35ad4089e7f91..3188c4cc7b96f 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2061,10 +2061,13 @@ macro(build_substrait) # Missing dll-interface: list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "/wd4251") - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL - "Clang") - # Protobuf generated files trigger some errors on CLANG TSAN builds - list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "-Wno-error=shorten-64-to-32") + else() + list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "-Wno-deprecated") + if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL + "Clang") + # Protobuf generated files trigger some errors on CLANG TSAN builds + list(APPEND SUBSTRAIT_SUPPRESSED_FLAGS "-Wno-error=shorten-64-to-32") + endif() endif() set(SUBSTRAIT_SOURCES)