TarsCloud / TarsCpp

C++ language framework rpc source code implementation
BSD 3-Clause "New" or "Revised" License
522 stars 254 forks source link

Update Thirdparty.cmake #249

Open tsurumi-yizhou opened 2 years ago

tsurumi-yizhou commented 2 years ago

原gtest 1.10版本编译不过,切换到1.11版本。from issue https://github.com/TarsCloud/TarsCpp/issues/239

ruanshudong commented 2 years ago

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

ruanshudong commented 2 years ago

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

tsurumi-yizhou commented 2 years ago

但是新版本就会编译不了了捏


发件人: ruanshudong @.> 发送时间: 2022年8月1日 15:21 收件人: TarsCloud/TarsCpp @.> 抄送: MINERVA @.>; Author @.> 主题: Re: [TarsCloud/TarsCpp] Update Thirdparty.cmake (PR #249)

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

― Reply to this email directly, view it on GitHubhttps://github.com/TarsCloud/TarsCpp/pull/249#issuecomment-1200813357, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVHSEFI542B3SMPQBO4SKJ3VW53GPANCNFSM55EUUTRA. You are receiving this because you authored the thread.Message ID: @.***>

ruanshudong commented 2 years ago

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

tsurumi-yizhou commented 2 years ago

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

[ 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 'PolymorphicAction' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(PolymorphicAction); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::PolymorphicAction' 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 'PolymorphicAction' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(PolymorphicAction); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::PolymorphicAction' 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_DISALLOWASSIGN(FloatingEqMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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_DISALLOWASSIGN(FloatingEqMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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 'StrEqualityMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(StrEqualityMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::StrEqualityMatcher' 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::StrEqualityMatcher>' 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 'HasSubstrMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(HasSubstrMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::HasSubstrMatcher' 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::HasSubstrMatcher>' 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 'StartsWithMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(StartsWithMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::StartsWithMatcher' 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::StartsWithMatcher>' 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 'EndsWithMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(EndsWithMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::EndsWithMatcher' 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::EndsWithMatcher>' first required here return MakePolymorphicMatcher(internal::EndsWithMatcher(suffix)); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googlemock/include/gmock/gmock-matchers.h:721:3: error: definition of implicit copy constructor for 'StrEqualityMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(StrEqualityMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::StrEqualityMatcher' 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::StrEqualityMatcher>' 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 'HasSubstrMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(HasSubstrMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::HasSubstrMatcher' 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::HasSubstrMatcher>' 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 'StartsWithMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(StartsWithMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::StartsWithMatcher' 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::StartsWithMatcher>' 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 'EndsWithMatcher' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] GTEST_DISALLOWASSIGN(EndsWithMatcher); ^ /Users/yizhou/TarsCpp/build/src/gtest-lib/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOWASSIGN' 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::EndsWithMatcher' 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::EndsWithMatcher>' 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 commented 2 years ago

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

tsurumi-yizhou commented 2 years ago

clang 14


发件人: ruanshudong @.> 发送时间: 2022年8月2日 18:05 收件人: TarsCloud/TarsCpp @.> 抄送: MINERVA @.>; Author @.> 主题: Re: [TarsCloud/TarsCpp] Update Thirdparty.cmake (PR #249)

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

― Reply to this email directly, view it on GitHubhttps://github.com/TarsCloud/TarsCpp/pull/249#issuecomment-1202282495, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVHSEFKOLFZPUH7BLO2QPTDVXDXGJANCNFSM55EUUTRA. You are receiving this because you authored the thread.Message ID: @.***>

ruanshudong commented 2 years ago

是啥OS上的?

LiangZuoting commented 2 years ago

是啥OS上的?

同样的报错,mac

ruanshudong commented 1 year ago

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

ruanshudong commented 1 year ago

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