summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard O'Grady <rjogrady@google.com>2023-04-11 11:39:51 -0700
committerRichard O'Grady <rjogrady@google.com>2023-04-11 11:55:49 -0700
commit00aa9ac61d37194cffb0913d9b7d71611eb05a4b (patch)
tree31a674772429b4129d09d227c356e7885d37692e
parentcfc573e08faf4d4c61a2bd8ccbfba1803a0fef59 (diff)
downloadsnappy-git-00aa9ac61d37194cffb0913d9b7d71611eb05a4b.tar.gz
Disable -Wsign-compare warning.
PiperOrigin-RevId: 523460180
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7711693..0082f57 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,11 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
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.
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")