From: Dominik Schmidt Date: Tue, 4 Apr 2017 13:34:32 +0000 (+0200) Subject: Fix build with recent Clang (on Linux) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~202 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ad033e40fdb6ee3415f1451cd5de819bcd731381;p=nextcloud-desktop.git Fix build with recent Clang (on Linux) --- diff --git a/cmake/modules/DefineCompilerFlags.cmake b/cmake/modules/DefineCompilerFlags.cmake index c8e831caa..b38c85569 100644 --- a/cmake/modules/DefineCompilerFlags.cmake +++ b/cmake/modules/DefineCompilerFlags.cmake @@ -24,6 +24,11 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -D_GNU_SOURCE") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS=1") + if (${CMAKE_C_COMPILER_ID} MATCHES "Clang") + # Disable warning for assert() statements in csync + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-statement-expression") + endif() + set(CSYNC_STRICT OFF CACHE BOOL "Strict error checking, enabled -Werror and friends") if (CSYNC_STRICT) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")