Commit Graph

26 Commits

Author SHA1 Message Date
Pavel Samolysov
751b5ffea0 Enable CI on Windows (appveyor) with Bazel
Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
2019-01-22 12:28:09 +03:00
Pavel Samolysov
04e108d89a Enable building as a shared library (dll) on Windows with Bazel
While the google test library is being built as a shared library using Bazel,
so that there is a rule like

cc_test(
     name = "iterator_traits_test",
     linkstatic = 0,
     deps = ["@gtest//:gtest_main"],
     ...
)

in a BUILD file, the following error appears on Windows:

INFO: Found 1 test target...
ERROR: C:/../external/gtest/BUILD.bazel:55:1: output 'external/gtest/gtest.if.lib' was not created
ERROR: C:/../external/gtest/BUILD.bazel:55:1: not all outputs were created or valid
Target //test:iterator_traits_test failed to build

The reason is a missing "win_def_file" attribute of the "gtest" and
"gtest_main" rules in the BUILD.bazel inside the google test library
package.

The "windows_export_all_symbols" feature is added to the rules, this
feature forces Bazel to export all symbols from the google test library
to linker. I believe exporting all symbols from a testing library makes
no problem for the application from a point of view on encapsulation.

Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
2019-01-14 16:20:56 +03:00
misterg
8dca659133 Googletest export
Fix bazel issue

PiperOrigin-RevId: 223829127
2018-12-03 14:22:48 -05:00
misterg
b1c8c73e93 Googletest export
Fix bazel issue

PiperOrigin-RevId: 223823930
2018-12-03 13:58:20 -05:00
krzysio
b6a0bb1499 Googletest export
Improve Bazel build files.

New target gtest_prod allows access to the FRIEND_TEST macro without depending on the entirety of GTest in production executables. Additionally, duplicate config_setting rules were removed and formatting was adjusted.

PiperOrigin-RevId: 220279205
2018-11-07 14:37:18 -05:00
misterg
2606747e3c Googletest export
Internal Change

PiperOrigin-RevId: 215236414
2018-10-01 14:31:07 -04:00
durandal
962e8c7779 Googletest export
Add myself to the authors table.

PiperOrigin-RevId: 214822035
2018-10-01 14:30:53 -04:00
Derek Mauro
7365cccdb2 Merge branch 'master' into stacktrace 2018-07-12 16:51:04 -04:00
Derek Mauro
d3ad5a86ec Adds the UniversalPrinter for absl::variant. 2018-07-12 13:46:50 -04:00
Derek Mauro
80ef621afa Adds stacktrace support from Abseil to Google Test
This change adds the ability to generate stacktraces in Google Test on
both failures of assertions/expectations and on crashes. The
stacktrace support is conditionally available only when using Abseil
with Google Test.

To use this support, run the test under Bazel with a command like this:

bazel test --define absl=1 --test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 //path/to/your:test

The "--define absl=1" part enables stacktraces on assertion/expectation
failures.

The "--test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" part enables
the signal handler that logs a stacktrace in the event of a crash
(this also requires the "--define absl=1" part). This is not the
default since it may interfere with existing tests.
2018-07-10 14:30:42 -04:00
Gennadiy Civil
d9df92287e Merges and also adding new bazel build mode 2018-01-31 12:05:18 -05:00
Gennadiy Civil
735ae77a8f Ability to optionally depend on Abseil plus upstream of 183716547 2018-01-30 11:42:03 -05:00
Loo Rong Jie
15605813a5 [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc
and x64_windows_msvc
2018-01-09 08:29:44 +08:00
Zhongming Qu
306c70e1fe Also can build when included in source. 2017-08-18 04:00:02 -07:00
Zhongming Qu
87ef34a0ac Remove trailing whitespaces in BUILD.bazel 2017-08-18 03:59:53 -07:00
misterg
91530fbb76 Addressing comments 2017-08-10 15:33:09 -04:00
misterg
4d386daead Added Copyright 2017-08-10 12:03:27 -04:00
misterg
a7b338585e Initial Revision, review 164634031 2017-08-10 11:54:46 -04:00
misterg
45b059daae WIP 2017-08-09 14:37:58 -04:00
misterg
dd94055b01 WIP 2017-08-09 11:47:54 -04:00
misterg
a19732de6c WIP, win testing 2017-08-08 15:41:44 -04:00
misterg
071e87fbcc WIP 2017-08-08 15:17:56 -04:00
misterg
532f8cbe41 WIP 2017-08-02 15:40:14 -04:00
misterg
00f9664796 WIP 2017-08-02 14:36:39 -04:00
misterg
55d7b53390 WIP 2017-08-01 14:50:59 -04:00
misterg
30ff155152 WIP 2017-08-01 14:36:29 -04:00