Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Thirdparty.cmake #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tsurumi-yizhou
Copy link

原gtest 1.10版本编译不过,切换到1.11版本。from issue #239

@ruanshudong
Copy link
Contributor

切换到新版本会导致低版本gcc编译不过了

@ruanshudong
Copy link
Contributor

这个问题我记得我改了gtest, 适配到新版gcc的

@tsurumi-yizhou
Copy link
Author

tsurumi-yizhou commented Aug 2, 2022 via email

@ruanshudong
Copy link
Contributor

这个问题我改过啊, 新版应该没问题啊, 提示啥错误?

@tsurumi-yizhou
Copy link
Author

这个问题我改过啊, 新版应该没问题啊, 提示啥错误?

[ 1%] Performing build step for 'ADD_gtest'
Consolidate compiler generated dependencies of target gtest
[ 25%] Built target gtest
Consolidate compiler generated dependencies of target gmock
[ 37%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/src/gmock-all.cc:39:
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock.h:59:
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-actions.h:455:3: error: definition of implicit copy constructor for 'PolymorphicActiontesting::internal::ReturnNullAction' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-actions.h:1011:10: note: in implicit copy constructor for 'testing::PolymorphicActiontesting::internal::ReturnNullAction' first required here
return MakePolymorphicAction(internal::ReturnNullAction());
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-actions.h:455:3: error: definition of implicit copy constructor for 'PolymorphicActiontesting::internal::ReturnVoidAction' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-actions.h:1016:10: note: in implicit copy constructor for 'testing::PolymorphicActiontesting::internal::ReturnVoidAction' first required here
return MakePolymorphicAction(internal::ReturnVoidAction());
^
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/src/gmock-all.cc:39:
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock.h:61:
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-function-mocker.h:39:
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-generated-function-mockers.h:47:
In file included from /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-spec-builders.h:75:
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:1506:3: error: definition of implicit copy constructor for 'FloatingEqMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3632:10: note: in implicit copy constructor for 'testing::internal::FloatingEqMatcher' first required here
return internal::FloatingEqMatcher(rhs, false);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:1506:3: error: definition of implicit copy constructor for 'FloatingEqMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3660:10: note: in implicit copy constructor for 'testing::internal::FloatingEqMatcher' first required here
return internal::FloatingEqMatcher(rhs, false);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:721:3: error: definition of implicit copy constructor for 'StrEqualityMatcherstd::string' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::StrEqualityMatcherstd::string' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3813:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::StrEqualityMatcherstd::string>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:778:3: error: definition of implicit copy constructor for 'HasSubstrMatcherstd::string' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::HasSubstrMatcherstd::string' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3842:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::HasSubstrMatcherstd::string>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:835:3: error: definition of implicit copy constructor for 'StartsWithMatcherstd::string' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(StartsWithMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::StartsWithMatcherstd::string' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3849:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::StartsWithMatcherstd::string>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:891:3: error: definition of implicit copy constructor for 'EndsWithMatcherstd::string' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(EndsWithMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::EndsWithMatcherstd::string' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3856:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::EndsWithMatcherstd::string>' first required here
return MakePolymorphicMatcher(internal::EndsWithMatcherstd::string(suffix));
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:721:3: error: definition of implicit copy constructor for 'StrEqualityMatcherstd::wstring' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::StrEqualityMatcherstd::wstring' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3865:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::StrEqualityMatcherstd::wstring>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:778:3: error: definition of implicit copy constructor for 'HasSubstrMatcherstd::wstring' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::HasSubstrMatcherstd::wstring' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3894:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::HasSubstrMatcherstd::wstring>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:835:3: error: definition of implicit copy constructor for 'StartsWithMatcherstd::wstring' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(StartsWithMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::StartsWithMatcherstd::wstring' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3901:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::StartsWithMatcherstd::wstring>' first required here
return MakePolymorphicMatcher(
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:891:3: error: definition of implicit copy constructor for 'EndsWithMatcherstd::wstring' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
GTEST_DISALLOW_ASSIGN_(EndsWithMatcher);
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
void operator=(type const &) = delete
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/gtest-matchers.h:454:7: note: in implicit copy constructor for 'testing::internal::EndsWithMatcherstd::wstring' first required here
class PolymorphicMatcher {
^
/Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:3908:10: note: in implicit move constructor for 'testing::PolymorphicMatcher<testing::internal::EndsWithMatcherstd::wstring>' first required here
return MakePolymorphicMatcher(
^
12 errors generated.
make[5]: *** [googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o] Error 1
make[4]: *** [googlemock/CMakeFiles/gmock.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [src/ADD_gtest-stamp/ADD_gtest-build] Error 2
make[1]: *** [CMakeFiles/ADD_gtest.dir/all] Error 2
make: *** [all] Error 2

macosx,clang 14

@ruanshudong
Copy link
Contributor

看起来得根据gcc版本来引用不同gtest版本了, 你目前用的啥版本的gcc ?

@tsurumi-yizhou
Copy link
Author

tsurumi-yizhou commented Aug 3, 2022 via email

@ruanshudong
Copy link
Contributor

是啥OS上的?

@LiangZuoting
Copy link

是啥OS上的?

同样的报错,mac

@ruanshudong
Copy link
Contributor

最新master分支这个问题修改了, 先暂时屏蔽gtest的mock了.
gtest这个比较蛋疼, 新版本gtest在老版本mac变异不过, 老版本gtest在新版本mac又编译不过.

@ruanshudong
Copy link
Contributor

这个问题最新版本改了 根据clang版本使用不同的gtest了.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants