Disable range-loop-construct warnings (#4951)
This commit is contained in:
committed by
Corentin Le Molgat
parent
7f22b7208c
commit
8802f29059
3
.bazelrc
3
.bazelrc
@@ -36,7 +36,7 @@ build --enable_platform_specific_config
|
||||
|
||||
build:linux --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
|
||||
build:linux --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
|
||||
|
||||
build:linux --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
|
||||
|
||||
###############################################################################
|
||||
# Options for macOS.
|
||||
@@ -48,6 +48,7 @@ build:macos --features=-supports_dynamic_linker
|
||||
build:macos --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
|
||||
build:macos --cxxopt=-Wno-sign-compare --host_cxxopt=-Wno-sign-compare
|
||||
build:macos --cxxopt=-Wno-dangling-field --host_cxxopt=-Wno-dangling-field
|
||||
build:macos --cxxopt=-Wno-range-loop-construct --host_cxxopt=-Wno-range-loop-construct
|
||||
build:macos --cxxopt=-mmacos-version-min=10.15 --host_cxxopt=-mmacos-version-min=10.15
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -90,6 +90,7 @@ python.defaults(python_version = DEFAULT_PYTHON)
|
||||
python.toolchain(python_version = DEFAULT_PYTHON)
|
||||
|
||||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||
|
||||
[
|
||||
pip.parse(
|
||||
envsubst = ["PIP_INDEX_URL"],
|
||||
|
||||
@@ -137,7 +137,11 @@ if(MSVC)
|
||||
"/wd4996" # The compiler encountered a deprecated declaration.
|
||||
)
|
||||
else()
|
||||
list(APPEND OR_TOOLS_COMPILE_OPTIONS "-fwrapv")
|
||||
list(APPEND OR_TOOLS_COMPILE_OPTIONS
|
||||
"-fwrapv"
|
||||
"-Wno-range-loop-construct"
|
||||
"-Wno-sign-compare"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link option
|
||||
|
||||
Reference in New Issue
Block a user