cginternals / cginternals/cppfs
GoogleTest should be included as ExternalProject
- Ngôn ngữ chính
- C++
- Star
- 514
- Fork
- 73
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi!
First off, thanks for providing and maintaining this library!
I noticed that GoogleTests is checked in as a part of the source and I'd like to suggest that CMake's `ExternalProject` feature could be used instead. It would allow `cppfs` to checkout and include it in the configure process. Additionally, this could become optional based on if `find_package()` cannot find an already installed GTest library on the host.
Please see GoogleTest readme for more information: Incorporating Into An Existing CMake Project (https://github.com/google/googletest/blob/4f4c01d8c86659f587ea0bc27c815ffa94fc9f72/googletest/README.md)
Main benefits include
1. 3rd party code is not checked in
2. `cppfs` no longer need to update `GoogleTest` them self.
3. `cppfs` could easily point to specific git tag or branch of `GoogleTest`
4. `GoogleTests` source is not included if `OPTION_` for tests is ON
5. If installed on host, Linking is easy as `find_package(GTest WANTED_VERSION EXACT)` and `target_link_libraries` with `GTest::GTest` and `GTest::Main`
6. If GoogleTests is downloaded and added to the project like suggested, just call `target_link_libraries` with `gtest` and `gtest_main`
If this sounds reasonable I would be happy to help out by sending a PR or further instructions.
Best regards
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với cấu hình CMake hiện đang bao gồm mã nguồn GoogleTest đã được đưa vào repository, rồi so sánh cấu hình đó với ExternalProject của CMake và hướng dẫn “Incorporating Into An Existing CMake Project” của GoogleTest. Công việc được xem là hoàn tất khi có thể tìm thấy GTest đã cài đặt bằng find_package; nếu không, GoogleTest sẽ được tải về khi cần và các target kiểm thử hiện có sẽ liên kết thông qua các target GTest phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cmake, cpp
- Lĩnh vực
- build-system, testing-qa
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100