Commit Graph

15 Commits

Author SHA1 Message Date
Derek Mauro
25dcdc7e8b Use the Abseil flags library when Abseil is present
When built with `--define=absl=1` under Bazel, GoogleTest
flags use ABSL_FLAG instead of GoogleTest's own implementation.

There are some minor behavior differences in this mode.

The most notable difference is that unrecognized flags result
in a flag parsing error, and are not returned to the user though
a modified argc/argv, unless they appear after the positional
argument delimiter ("--").

For example, to pass a non-Abseil flag, you would have to do
./mytest --gtest_color=false -- --myflag=myvalue

The documentation at https://abseil.io/docs/cpp/guides/flags
may be helpful in understanding the behavior.

There are some other minor differences. For example,
passing --help results in the program returning 1 instead of 0.

https://github.com/google/googletest/issues/3646

PiperOrigin-RevId: 439312700
Change-Id: Id696a25f50f24a5b1785c45ca8fa59794f86fd5c
2022-04-04 07:39:03 -07:00
Vertexwahn
277e0a0168 Remove bazelbuild/rules_cc dependency 2021-09-17 10:04:26 +02:00
dmauro
56e4b1a515 Googletest export
Run buildifier on WORKSPACE
Fixes #3483

PiperOrigin-RevId: 385610473
2021-07-22 14:53:34 -04:00
dmauro
8ceecc27c7 Googletest export
Updates Linux docker image to use Bazel 4.1.0 and GCC 11.1
Updates Bazel dependencies
Removes the last usage of the deprecated and removed Python2

PiperOrigin-RevId: 375759184
2021-06-02 17:54:36 -04:00
Abseil Team
e7e591764b Googletest export
Format WORKSPACE and googlemock/test/BUILD.bazel using buildifier

PiperOrigin-RevId: 360913861
2021-03-04 12:07:39 -05:00
dmauro
7e7e94429d Googletest export
Stop using master.zip to make the build reproducible

PiperOrigin-RevId: 337102716
2020-10-14 18:26:49 -04:00
misterg
c9ccac7cb7 Googletest export
Stop depending on the abseil master

PiperOrigin-RevId: 264210838
2019-08-19 16:17:03 -04:00
Gennadiy Civil
30e58a89a4 Merge pull request #2381 from Yannic:fix_bazel
PiperOrigin-RevId: 264186624
2019-08-19 14:20:03 -04:00
misterg
27e17f7851 Googletest export
Stop depending on the abseil master

PiperOrigin-RevId: 263789087
2019-08-16 12:50:16 -04:00
Yannic Bonenberger
6fd262ecf7 Prepare for Bazel incompatible changes
Fixes googletest for upcoming `--incompatible_load_cc_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/8743) and `--incompatible_load_python_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/9006).

This change was automatically generated with `buildifier -lint=fix -warnings=all $(find . -name "BUILD" -o -name "BUILD.bazel" -o -name "*.bzl")`.
2019-08-07 17:08:10 +02:00
Gennadiy Civil
214521a148
Update WORKSPACE
Need this for bazel change
2018-12-03 14:18:47 -05:00
Gennadiy Civil
2a4683021a Ability to optionally depend on Abseil plus upstream of 183716547 2018-01-30 11:42:03 -05:00
Gennadiy Civil
4e284ee657 Update WORKSPACE
Remove comments
2017-08-10 14:47:24 -04:00
misterg
cb5b05436d Added Copyright 2017-08-10 12:03:27 -04:00
misterg
f63e2a14a2 WIP 2017-08-01 14:36:29 -04:00