From b23ff17dde6377d006c18b8de694a2827d992b52 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 4 Jul 2017 18:50:15 +0300 Subject: [PATCH] Disable -Werror for parentheses-equality warning This warning fires here: /home/travis/build/jaagr/polybar/src/utils/command.cpp:135:46: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] } else if ((((*(int *) &(m_forkstatus))) == 0xffff)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ and as this system macro cannot be changed, let's not turn this into an error --- cmake/01-core.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/01-core.cmake b/cmake/01-core.cmake index d65c62c3..67ed81bf 100644 --- a/cmake/01-core.cmake +++ b/cmake/01-core.cmake @@ -26,6 +26,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors") +if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=parentheses-equality") +endif() + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g2")