diff options
author | Dominik Schmidt <dev@dominik-schmidt.de> | 2017-04-04 16:34:32 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2019-08-27 10:24:29 +0300 |
commit | fd98d8c05eac1ad33a81e4e84f3b3d20cc4caff0 (patch) | |
tree | c3d35426acf891f0853f04a5fd85a18272918acc /cmake | |
parent | 54d1bb95a0cb36fac0d4638ed0fbb893ce69228a (diff) |
Fix build with recent Clang (on Linux)
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/DefineCompilerFlags.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
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") |