[PATCH] D35924: [CMake] Disable -Werror for CMake checks

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 16:48:36 PDT 2017


phosek created this revision.
Herald added a subscriber: mgorny.

-Werror may cause some of the CMake checks to fail, so we disable it even if it's enabled for the build itself.


Repository:
  rL LLVM

https://reviews.llvm.org/D35924

Files:
  cmake/modules/HandleLLVMOptions.cmake


Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -381,6 +381,7 @@
 
 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS)
   add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
   if (LLVM_ENABLE_CXX1Y)
     check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35924.108388.patch
Type: text/x-patch
Size: 553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170726/4fd7006c/attachment.bin>


More information about the llvm-commits mailing list