Disable -Wsign-compare warning.

PiperOrigin-RevId: 523460180
This commit is contained in:
Richard O'Grady 2023-04-11 11:39:51 -07:00
parent cfc573e08f
commit 00aa9ac61d
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Disable sign comparison warnings. Matches upcoming Bazel setup.
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-sign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-sign-compare")
# Disable C++ exceptions. # Disable C++ exceptions.
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")