bazel: move -std=c++14 to .bazelrc

Bazel defaults to -std=c++11 on macOS which gtest doesn't support.
This commit is contained in:
Keith Smiley 2022-08-19 11:10:56 -07:00
parent c0e032efe5
commit 91c3669f21
No known key found for this signature in database
GPG Key ID: 33BA60D44C7167F8
4 changed files with 4 additions and 8 deletions

1
.bazelrc Normal file
View File

@ -0,0 +1 @@
build --cxxopt=-std=c++14

View File

@ -4,9 +4,6 @@ on:
push: push:
pull_request: pull_request:
env:
BAZEL_CXXOPTS: -std=c++14
jobs: jobs:
Linux: Linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -17,7 +14,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Tests - name: Tests
run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... run: bazel test --features=external_include_paths --test_output=errors ...
MacOs: MacOs:
runs-on: macos-latest runs-on: macos-latest
@ -28,7 +25,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Tests - name: Tests
run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... run: bazel test --features=external_include_paths --test_output=errors ...
Windows: Windows:
@ -40,4 +37,4 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Tests - name: Tests
run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... run: bazel test --features=external_include_paths --test_output=errors ...

View File

@ -72,7 +72,6 @@ time docker run \
--workdir="/src" \ --workdir="/src" \
--rm \ --rm \
--env="CC=/usr/local/bin/gcc" \ --env="CC=/usr/local/bin/gcc" \
--env="BAZEL_CXXOPTS=-std=c++14" \
${LINUX_GCC_FLOOR_CONTAINER} \ ${LINUX_GCC_FLOOR_CONTAINER} \
/usr/local/bin/bazel test ... \ /usr/local/bin/bazel test ... \
--copt="-Wall" \ --copt="-Wall" \

View File

@ -66,7 +66,6 @@ for absl in 0 1; do
${BAZEL_BIN} test ... \ ${BAZEL_BIN} test ... \
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--cxxopt="-std=c++14" \
--define="absl=${absl}" \ --define="absl=${absl}" \
--features=external_include_paths \ --features=external_include_paths \
--keep_going \ --keep_going \