From f5f0fa3272522bb1a268bde85471198da8d4e935 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Fri, 22 Apr 2022 11:03:38 -0400 Subject: [PATCH] [zlib] Turn off warnings as errors for -Wstrict-prototypes until upstream https://github.com/madler/zlib/issues/633 is resolved --- src/native/external/zlib.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/native/external/zlib.cmake b/src/native/external/zlib.cmake index 6365a1ea5585ac..6bdec9ec45eb42 100644 --- a/src/native/external/zlib.cmake +++ b/src/native/external/zlib.cmake @@ -24,3 +24,8 @@ set(ZLIB_SOURCES_BASE ) addprefix(ZLIB_SOURCES "${CMAKE_CURRENT_LIST_DIR}/zlib" "${ZLIB_SOURCES_BASE}") + +if (CMAKE_C_COMPILER_ID MATCHES "Clang") + # Turn off warn-as-error for strict prototype checking until https://github.com/madler/zlib/issues/633 is fixed upstream + set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_OPTIONS "-Wno-error=strict-prototypes") +endif()