So far GParted includes Google Test 1.8.1 [1], which was the latest
release which supported pre-C++11 compilers [2]. Now that GParted
requires C++11 compilation, update to Google Test 1.10.0. Replace the
following files and directories from Google Test 1.10.0:
LICENSE
README.md
include/
src/
Note the LICENSE file is identical, where as the other files have
changed. This includes file additions and removals, hence the change
to Makefile.am too.
Even though Google Test releases up to and including 1.12.1 are
compilable with C++11 compilers [3], it is not possible to upgrade
beyond Google Test 1.10.0 at this time because later releases fail to
compile on on still supported RHEL / CentOS 7 with this error:
$ cd lib/gtest
$ make check
...
./include/gtest/gtest-matchers.h:414:12: error: 'is_trivially_copy_constructible' is not a member of 'std'
std::is_trivially_copy_constructible<M>::value &&
^
This failure turns out to be because GCC libstdc++ 4.8.5 doesn't include
is_trivially_copy_constructible et al [4][5].
[1] commit 2b222978f5
Update to Google Test 1.8.1
[2] Google Test release v1.8.1
https://github.com/google/googletest/releases/tag/release-1.8.1
"The 1.8.x is the last release supporting pre-C++11 compilers."
[3] Google Test release v1.12.1
https://github.com/google/googletest/releases/tag/release-1.12.1
"This will be the last release to support C++11. Future releases
will require at least C++14."
[4] 'is_trivially_copyable' is not a member of 'std'
https://stackoverflow.com/questions/25123458/is-trivially-copyable-is-not-a-member-of-std/25123551#25123551
"Some of them are not implemented. If we look at libstdc++'s C++11
status page:
Type properties are listed as partially implemented.
They list as missing:
...
is trivially_copy_constructible
"
[5] The GNU C++ Library, 1. Status, C++11
https://gcc.gnu.org/onlinedocs/gcc-4.8.3/libstdc++/manual/manual/status.html#status.iso.2011
"
| Section | Description | Status | Comments
...
| 20.9.4.3 | Type properties | Partial | Missing
is_trivially_copyable, is_trivially_constructible,
is_trivially_default_constructible, is_trivially_copy_constructible,
is_trivially_move_constructible, is_trivially_assignable,
is_trivially_default_assignable, is_trivially_copy_assignable,
is_trivially_move_assignable |
"
Closes!117 - Require C++11 compilation
This closely follows the minimal-gtest-autotools template project.
https://github.com/octol/minimal-gtest-autotools
Now 'make check' will additionally build the Google Test C++ test
framework libraries.
Bug 781978 - Add Google Test C++ test framework