forked from ApolloAuto/apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbazel.rc
64 lines (52 loc) · 2.34 KB
/
bazel.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# +------------------------------------------------------------+
# | Startup Options |
# +------------------------------------------------------------+
startup --batch_cpu_scheduling
# +------------------------------------------------------------+
# | Test Configurations |
# +------------------------------------------------------------+
# By default prints output only from failed tests.
test --test_output=errors
# Work around the sandbox issue.
test --spawn_strategy=standalone
# Specify protobuf cc toolchain
test --proto_toolchain_for_cc="@com_google_protobuf//:cc_toolchain"
# +------------------------------------------------------------+
# | CPP Lint Tests & Unit Tests |
# +------------------------------------------------------------+
# By default, cpplint tests are run as part of `bazel test` alongside all of
# the other compilation and test targets. This is a convenience shortcut to
# only do the cpplint testing and nothing else.
# Do bazel test --config=cpplint <target> to enable this configuration.
# To enable the lint test, the BUILD *must* load the cpplint.bzl by having
# 'load("//tools:cpplint.bzl", "cpplint")' at the beginning and 'cpplint()'
# at the end.
test:cpplint --test_tag_filters=cpplint
test:cpplint --build_tests_only
# Regular unit tests.
test:unit_test --test_tag_filters=-cpplint
# Coverage tests
test:coverage --test_tag_filters=-cpplint
test:coverage --copt=--coverage
test:coverage --cxxopt=--coverage
test:coverage --cxxopt=-fprofile-arcs
test:coverage --cxxopt=-ftest-coverage
test:coverage --linkopt=-coverage
test:coverage --linkopt=-lgcov
test:coverage --linkopt=-lgcc
test:coverage --linkopt=-lc
# +------------------------------------------------------------+
# | Build Configurations |
# +------------------------------------------------------------+
# Do not show warnings from external dependencies.
build --output_filter="^//"
# Work around the sandbox issue.
build --spawn_strategy=standalone
# Specify protobuf cc toolchain
build --proto_toolchain_for_cc="@com_google_protobuf//:cc_toolchain"
# build with profiling
build:cpu_prof --linkopt=-lprofiler
# Enable C++14
# build --cxxopt="-std=c++14"
# Enable colorful output of GCC
# build --cxxopt="-fdiagnostics-color=always"