cginternals / cginternals/cppfs

GoogleTest should be included as ExternalProject

オープン
#24 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
514
フォーク
73
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

現在チェックインされている GoogleTest のソースを含めている CMake 構成から始め、CMake の ExternalProject と GoogleTest の「Incorporating Into An Existing CMake Project」のガイダンスと比較します。完了条件は、インストール済みの GTest を find_package で見つけられることです。そうでない場合は、必要に応じて GoogleTest を取得し、既存のテストターゲットを適切な GTest ターゲット経由でリンクします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cmake, cpp
領域
build-system, testing-qa
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。