Skip to content

Commit 8802f29

Browse files
gchateletMizux
authored andcommitted
Disable range-loop-construct warnings (#4951)
1 parent 7f22b72 commit 8802f29

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
@@ -137,7 +137,11 @@ if(MSVC)
137137
"/wd4996" # The compiler encountered a deprecated declaration.
138138
)
139139
else()
140-
list(APPEND OR_TOOLS_COMPILE_OPTIONS "-fwrapv")
140+
list(APPEND OR_TOOLS_COMPILE_OPTIONS
141+
"-fwrapv"
142+
"-Wno-range-loop-construct"
143+
"-Wno-sign-compare"
144+
)
141145
endif()
142146

143147
# Link option

0 commit comments

Comments
 (0)