From 6fa93623516dc57f930c5208ed5f1a83434810b8 Mon Sep 17 00:00:00 2001 From: Arda Aytekin Date: Wed, 21 Mar 2018 18:21:39 +0100 Subject: [PATCH] Fix gcc build problem Fixed gcc-related build problem resulting from `-errwarn=%all` switch. Fixes #3012. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c905bca..bfee02a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,7 +298,9 @@ endif () if (LIBZMQ_WERROR) zmq_check_cxx_flag_prepend ("-Werror") - zmq_check_cxx_flag_prepend ("-errwarn=%all") + if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + zmq_check_cxx_flag_prepend ("-errwarn=%all") + endif() endif () if (CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")