I want to test to build googletest basic example, but I fail...
[Steps]
$ cd ~/Test/
$ git clone https://github.com/google/googletest
$ cd googletest ---> It's the first dir
$ mkdir mybuild
$ cd mybuild
$ cmake -Dgtest_build_samples=ON .. ---> One warning
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
gTest_build_samples
--Build files have been written to /home/hughesyang/Test/googletest/mybuild
$ make ---> error occur!
Error message(snippet first 17 lines):
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hughesyang/Test/googletest/mybuild
[ 3%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home/hughesyang/Test/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:38:0,
from /home/hughesyang/Test/googletest/googletest/include/gtest/gtest-death-test.h:40,
from /home/hughesyang/Test/googletest/googletest/include/gtest/gtest.h:62,
from /home/hughesyang/Test/googletest/googletest/src/gtest-all.cc:38:
/home/hughesyang/Test/googletest/googletest/include/gtest/gtest-matchers.h: In static member function ‘static constexpr bool testing::internal::MatcherBase::IsInlined()’:
/home/hughesyang/Test/googletest/googletest/include/gtest/gtest-matchers.h:414:12: error: ‘is_trivially_copy_constructible’ is not a member of ‘std’
std::is_trivially_copy_constructible::value &&
^
/home/hughesyang/Test/googletest/googletest/include/gtest/gtest-matchers.h:414:50: error: expected primary-expression before ‘>’ token
std::is_trivially_copy_constructible::value &&
^
/home/hughesyang/Test/googletest/googletest/include/gtest/gtest-matchers.h:414:51: error: ‘::value’ has not been declared
std::is_trivially_copy_constructible::value &&
...
[Environment]
OS: CentOS 7.7
CMake ver: 3.21.2
GNU Make ver: 4.2.1
gcc ver: 9.3.1-2
Any suggestion is very useful!