Skip to content

Commit f790280

Browse files
derekmaurodinord
authored andcommitted
Googletest export
Remove -Werror from the CMake compiler flags We should not force warnings as errors on users. Sometimes compilers introduce new warnings which will break builds. Instead, we manually turn this flag on in our continuous integration scripts so we can catch these errors, but not force them on our users. Fixes #3447 PiperOrigin-RevId: 380241852
1 parent 7153098 commit f790280

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

googletest/cmake/internal_utils.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ macro(config_compiler_and_linker)
8484
# Ensure MSVC treats source files as UTF-8 encoded.
8585
set(cxx_base_flags "${cxx_base_flags} -utf-8")
8686
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
87-
set(cxx_base_flags "-Wall -Wshadow -Werror -Wconversion")
87+
set(cxx_base_flags "-Wall -Wshadow -Wconversion")
8888
set(cxx_exception_flags "-fexceptions")
8989
set(cxx_no_exception_flags "-fno-exceptions")
9090
set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls")
9191
set(cxx_no_rtti_flags "-fno-rtti")
9292
elseif (CMAKE_COMPILER_IS_GNUCXX)
93-
set(cxx_base_flags "-Wall -Wshadow -Werror")
93+
set(cxx_base_flags "-Wall -Wshadow")
9494
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
9595
set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
9696
endif()

0 commit comments

Comments
 (0)