瀏覽代碼

Disable nonliteral format warnings on clang

These are incompatible with functions such as gettext() as clang hasn't
implemented the function attribute function_arg.
tags/v1.11.90
Pierre Ossman 2 年之前
父節點
當前提交
087895a2f8
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      CMakeLists.txt

+ 5
- 0
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)

Loading…
取消
儲存