aboutsummaryrefslogtreecommitdiff
path: root/CompilerChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CompilerChecks.cmake')
-rw-r--r--CompilerChecks.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
index be428dc2..3b36cc6c 100644
--- a/CompilerChecks.cmake
+++ b/CompilerChecks.cmake
@@ -51,7 +51,10 @@ if (UNIX)
add_c_compiler_flag("-Werror=format-security" SUPPORTED_COMPILER_FLAGS)
# Allow zero for a variadic macro argument
- add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
+ string(TOLOWER "${CMAKE_C_COMPILER_ID}" _C_COMPILER_ID)
+ if ("${_C_COMPILER_ID}" STREQUAL "clang")
+ add_c_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" SUPPORTED_COMPILER_FLAGS)
+ endif()
add_c_compiler_flag("-fno-common" SUPPORTED_COMPILER_FLAGS)