From ebc65b360483b27111d2f727bb4aea66aa778eba Mon Sep 17 00:00:00 2001
From: Piotr Karbowski <slashbeast@gentoo.org>
Date: Sun, 14 Mar 2021 16:33:33 +0100
Subject: [PATCH] Drop -Werror

Origin: Gentoo
Upstream-Status: Unknown
[ismael@sourcemage.org: Rebased on 6.2.2]
Signed-off-by: Ismael Luceno <ismael@sourcemage.org>
---
 cmake/modules/DispatchCompilerWarnings.cmake |    1 -
 src/CMakeLists.txt                           |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmake/modules/DispatchCompilerWarnings.cmake b/cmake/modules/DispatchCompilerWarnings.cmake
index 3fd1b3ddf673..ee886ffea5c3 100644
--- a/cmake/modules/DispatchCompilerWarnings.cmake
+++ b/cmake/modules/DispatchCompilerWarnings.cmake
@@ -6,7 +6,6 @@ elseif(WIN32)
   # so that we can use __popcnt64
   add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-fms-extensions>)
 else()
-  add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror>)
   add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wall>)
   add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wextra>)
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index adc989d..2841aa2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -127,7 +127,7 @@ endif()
 # FIXME(compnerd) add check for -fblocks?
 target_compile_options(dispatch PRIVATE -fblocks)
 
-check_c_compiler_flag("-momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
+check_c_compiler_flag("-momit-leaf-frame-pointer -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
 if (C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
   target_compile_options(dispatch PRIVATE -momit-leaf-frame-pointer)
 endif()
