[PATCH] D81695: [flang] Turn off FLANG_ENABLE_WERROR by default

Isuru Fernando via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 15:27:02 PDT 2020


isuruf created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a reviewer: DavidTruby.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
isuruf added subscribers: mehdi_amini, richard.barton.arm, ChinouneMehdi, Meinersbur, tskeith.

This is a follow up to https://reviews.llvm.org/D78306


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81695

Files:
  flang/CMakeLists.txt


Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -37,13 +37,7 @@
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 include(AddFlang)
 
-if (MSVC)
-  set(_FLANG_ENABLE_WERROR_DEFAULT OFF)
-else ()
-  set(_FLANG_ENABLE_WERROR_DEFAULT ON)
-endif()
-option(FLANG_ENABLE_WERROR "Fail and stop building flang if a warning is triggered."
-       "${_FLANG_ENABLE_WERROR_DEFAULT}")
+option(FLANG_ENABLE_WERROR "Fail and stop building flang if a warning is triggered." OFF)
 
 # Check for a standalone build and configure as appropriate from
 # there.
@@ -258,9 +252,6 @@
     append("-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     append("-Wno-error" CMAKE_REQUIRED_FLAGS)
   endif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
-  if (NOT LLVM_ENABLE_WERROR)
-      message(WARNING "FLANG_ENABLE_WERROR setting is different from LLVM_ENABLE_WERROR.")
-  endif()
 endif()
 
 # Builtin check_cxx_compiler_flag doesn't seem to work correctly


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81695.270245.patch
Type: text/x-patch
Size: 1045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200611/7ea76535/attachment.bin>


More information about the llvm-commits mailing list