Skip to content

Commit 7d0aa1a

Browse files
authored
Disable range-loop-construct warnings (#4951)
1 parent 4ad5ccd commit 7d0aa1a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.bazelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ build --enable_platform_specific_config
3636

3737
build:linux --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
3838
build:linux --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
39-
39+
build:linux --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
4040

4141
###############################################################################
4242
# Options for macOS.
@@ -48,6 +48,7 @@ build:macos --features=-supports_dynamic_linker
4848
build:macos --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
4949
build:macos --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
5050
build:macos --cxxopt=-Wno-dangling-field --host_cxxopt=-Wno-dangling-field
51+
build:macos --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
5152
build:macos --cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-mmacos-version-min=10.15
5253

5354
###############################################################################

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ python.defaults(python_version = DEFAULT_PYTHON)
9090
python.toolchain(python_version = DEFAULT_PYTHON)
9191

9292
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
93+
9394
[
9495
pip.parse(
9596
envsubst = ["PIP_INDEX_URL"],

cmake/cpp.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ if(MSVC)
133133
"/wd4996" # The compiler encountered a deprecated declaration.
134134
)
135135
else()
136-
list(APPEND OR_TOOLS_COMPILE_OPTIONS "-fwrapv")
136+
list(APPEND OR_TOOLS_COMPILE_OPTIONS
137+
"-fwrapv"
138+
"-Wno-range-loop-construct"
139+
"-Wno-sign-compare"
140+
)
137141
endif()
138142

139143
# Link option

0 commit comments

Comments
 (0)