Commit 9017b9ce authored by Isuru Fernando's avatar Isuru Fernando
Browse files

[flang] Turn off FLANG_ENABLE_WERROR by default

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

Reviewers: DavidTruby, sscalpone, jdoerfert

Reviewed By: DavidTruby

Subscribers: tskeith, Meinersbur, ChinouneMehdi, richard.barton.arm, mehdi_amini, mgorny, llvm-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D81695
parent f5f15ace
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -37,13 +37,7 @@ endif()
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.
@@ -305,9 +299,6 @@ if (FLANG_ENABLE_WERROR)
    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