Commit Graph

3 Commits

Author SHA1 Message Date
Steven Perron
8841d560c4
Add c++ version to .bazelrc (#5247)
I finally found out how to add platform specific options to the bazelrc
file. I will use that to add the c++ language level to the bazelrc flie.
2023-05-30 09:29:04 -04:00
Nathan Gauër
987a5f1367
build: change the way we set cxx version for bazel. (#5114)
Before, we did set cxx version to c++17 using COPTS in our bazel files.
This was wrong, and part of the dependencies were then built with the
default standard version. This was not an issue until we moved to c++17.

Then, we decided to use the bazel --cxxopt=-std=c++17, but this was only
valid for nix platforms.
The last option left is to ask the user to specify the standard
when building using bazel.
2023-02-20 11:11:16 +01:00
Nathan Gauër
d8759a140b
build: fix bazel build for c++17 (#5097)
This commit changes the way bazel chooses which version to build.
Before, we had a COPT set to -std=c++17, which is analogous to the cmake
way.
However, googletest decided to follow abseil, meaning this is *not*
recommended at all, and causes a mixed-standard build.

From https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil
we have 3 options to define the standard. Using a bazelrc is what I
believe to be the simplest, as it "fixes" the repo standard.

Signed-off-by: Nathan Gauër <brioche@google.com>
2023-02-02 14:05:02 +00:00