-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 GTest/GMock structure, apply some fixes #2256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. In general looks good but let's use the directory structure generated by the fuse script (not introduce include directories) and use gtest instead of gmock as the top-level directory since the gmock component is way less important:
gtest/
gtest/gtest.h
gmock/gmock.h
gmock-gtest-all.cc
Maybe I should also rename CMake target then? |
Good idea. |
Sorry for breaking your message into pieces, but I just realized that |
On the other hand, maybe warnings (not errors, if no other |
Yeah, I think warnings are OK. |
…ck usages * all GTest/GMock files moved to `test/gtest` directory * `CMakeLists.txt` created in `test/gtest` from `CMakeLists.txt` in `test` * GTest/GMock target in CMake renamed to `gtest` (was `gmock`) * CMake `gtest` target updated to export includes as "gtest/gtest.h" or "gmock/gmock.h" only * includes in tests updated: "gtest.h" -> "gtest/gtest.h", "gmock.h" -> "gmock/gmock.h" * removed duplications of `target_include_directories` for GTest/GMock directories (CMake manages them)
…t formatting there
…perly `std::is_pod<T>` was deprecated in C++20 original (pre `is_pod`) error on GCC 4.8: ``` /fmt/test/gtest/gtest.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()': /fmt/test/gtest/gtest.h:6512:12: error: 'is_trivially_copy_constructible' was not declared in this scope std::is_trivially_copy_constructible<M>::value && ^ /fmt/test/gtest/gtest.h:6512:45: error: expected primary-expression before '>' token std::is_trivially_copy_constructible<M>::value && ^ /fmt/test/gtest/gtest.h:6512:46: error: '::value' has not been declared std::is_trivially_copy_constructible<M>::value && ^ ```
7f14bfb
to
9e5072f
Compare
I updated this PR with a few additional updates like a fix for Also, there are 2 places I want to discuss:
|
Awesome, thanks! |
Great, but what do you think about #2256 (comment)? 🙂 |
Both suggestions look reasonable to me. |
test/gtest
directoryCMakeLists.txt
created intest/gtest
fromCMakeLists.txt
intest
gtest
(wasgmock
)gtest
target updated to export includes as "gtest/gtest.h" or "gmock/gmock.h" onlytarget_include_directories
for GTest/GMock directories (CMake manages them).clang-format
file added intotest/gtest
directory to prevent formatting thereGTEST_LANG_CXX11
compile definition setting removedstd::is_trivially_copy_constructible
for GCC 4.8 & 4.9 fixed properly