|
|
For future reference, here are the steps required to update googletest (gtest)
|
|
|
- download new version of [googletest](https://github.com/google/googletest)
|
|
|
- use ``googletest/scripts/fuse_gtest_files.py`` to obtain only ``gtest.h`` and ``gtest-all.cc``
|
|
|
- (probably not necessary anymore as the memory usage seems to be fine with clang-format-8 and recent gtest versions) manually apply clang-format on a computer with a lot of memory to ``gtest.h``
|
|
|
- suppress warnings in gtest.h by inserting (compare old version of ``gtest.h``)
|
|
|
```c++
|
|
|
#if defined(__clang__)
|
|
|
# pragma clang system_header
|
|
|
#elif defined(__GNUC__)
|
|
|
# pragma GCC system_header
|
|
|
#endif
|
|
|
```
|
|
|
- insert ( compare old version of ``gtest-all.cc``)
|
|
|
```c++
|
|
|
#include <dune/xt/common/disable_warnings.hh>
|
|
|
#define GTEST_DONT_DEFINE_TEST 1
|
|
|
```
|
|
|
at the beginning of ``gtest-all.cc`` and
|
|
|
```c++
|
|
|
#include <dune/xt/common/reenable_warnings.hh>
|
|
|
```
|
|
|
at the end.
|
|
|
- (only necessary in dune-xt-data, not necessary anymore in dune-xt) rename gtest-all.cc to gtest-all.cxx, otherwise the CMake test magic will create a test_gtest from this file.
|
|
|
- replace old versions of ``gtest.h`` and ``gtest.cxx/cc`` with the new versions |
|
|
\ No newline at end of file |