How to add this option into a target description section?
Thanks.
How to add this option into a target description section?
Thanks.
Add bazel build --cxxopt='-std=c++11'
to .bazelrc
file.
Besides setting it globally in .bazelrc
or using BAZEL_CXXOPTS
, you can also set them individually for each target in their cc_binary
or cc_test
rules:
cc_binary(
name = "target1",
srcs = ["target1.cc"],
copts = ["--std=c++17"],
)
cc_binary(
name = "target2",
srcs = ["target2.cc"],
copts = ["--std=c++14"],
)
© 2022 - 2024 — McMap. All rights reserved.