aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2021-06-08 10:14:17 +0200
committerPierre Ossman <ossman@cendio.se>2021-06-08 11:12:24 +0200
commit087895a2f8ea99484265461fac82cb07a343b3a3 (patch)
tree52b8f4415e9948b567813f9e97cbb663880f2b6a /CMakeLists.txt
parenta616f0938ab2e1271882de50d7ae8eac6b0edeba (diff)
downloadtigervnc-087895a2f8ea99484265461fac82cb07a343b3a3.tar.gz
tigervnc-087895a2f8ea99484265461fac82cb07a343b3a3.zip
Disable nonliteral format warnings on clang
These are incompatible with functions such as gettext() as clang hasn't implemented the function attribute function_arg.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f1505e0..1cd1f696 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,11 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=vla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=vla")
ENDIF()
+# clang doesn't support format_arg, which breaks this warning
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-nonliteral -Wno-format-security")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security")
+endif()
option(ENABLE_ASAN "Enable address sanitizer support" OFF)
if(ENABLE_ASAN AND NOT WIN32 AND NOT APPLE)