[PATCH] D31702: Append -w when LLVM_ENABLE_WARNINGS is Off.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 5 02:53:47 PDT 2017


v.g.vassilev updated this revision to Diff 94180.
v.g.vassilev marked an inline comment as done.
v.g.vassilev added a comment.

Ah good point. Thanks!


https://reviews.llvm.org/D31702

Files:
  cmake/modules/HandleLLVMOptions.cmake


Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -561,6 +561,10 @@
   add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG)
 endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
 
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)
+  append("-w" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+endif()
+
 macro(append_common_sanitizer_flags)
   if (NOT MSVC)
     # Append -fno-omit-frame-pointer and turn on debug info to get better


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31702.94180.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170405/15cf6abd/attachment.bin>


More information about the cfe-commits mailing list