aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-23 09:13:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-23 22:33:29 +0200
commit4ae7e35d9ce889d39a885081fec39bcee3b275aa (patch)
treed807643119821a7163aff75117902d9f4fd7870e
parent47bf099c36c3bec1c490a14c9b045d9174ece96c (diff)
downloadlibssh-4ae7e35d9ce889d39a885081fec39bcee3b275aa.tar.gz
libssh-4ae7e35d9ce889d39a885081fec39bcee3b275aa.tar.xz
libssh-4ae7e35d9ce889d39a885081fec39bcee3b275aa.zip
cmake: Allow zero for variadic macro argument
This is also needed for clang. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--CompilerChecks.cmake8
1 files changed, 3 insertions, 5 deletions
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
index 4d8850c6..57afba81 100644
--- a/CompilerChecks.cmake
+++ b/CompilerChecks.cmake
@@ -62,6 +62,9 @@ if (UNIX)
add_c_compiler_flag("-Wno-error=deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)
endif()
+
+ # Allow zero for a variadic macro argument
+ add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
endif()
if (MSVC)
@@ -77,9 +80,4 @@ if (OSX)
add_c_compiler_flag("-Wno-deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
endif()
-if (BSD)
- # Allow zero for a variadic macro argument
- add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
-endif()
-
set(DEFAULT_C_COMPILE_FLAGS ${SUPPORTED_COMPILER_FLAGS} CACHE INTERNAL "Default C Compiler Flags" FORCE)