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

meson: Update version requirement for GTest (>= 1.10.0) #1131

Merged
merged 1 commit into from Mar 25, 2023

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Mar 25, 2023

GTestの依存関係を探す処理を更新してバージョン要件を1.10.0以上にします。
また、ライブラリ gtest_main を使うようにmeson.buildを変更します。

変更前は dependency()main キーワード引数 を利用してGTestが提供する main() とリンクしていました。
GTest 1.10.0のころから pkg-config のサポートが追加されているため main キーワードを使わなくてもテストをビルドできるようになりました。

この修正でMeson実装の一つである muon を使ってJDimのビルドやテストが可能になります。
dependency()main キーワードは今のところ古いGTestのサポート以外では使われていないようです。

GTestの依存関係を探す処理を更新してバージョン要件を1.10.0以上にします。
また、ライブラリ 'gtest_main' を使うようにmeson.buildを変更します。

変更前は dependency() の 'main' キーワード引数[1]を利用して
GTestが提供する main() とリンクしていました。
GTest 1.10.0のころから pkg-config のサポートが追加されているため
'main' キーワードを使わなくてもテストをビルドできるようになりました。

この修正でMeson実装の一つである muon[2] を使ってJDimのビルドやテストが
可能になります。dependency() の 'main' キーワードは今のところ
古いGTestのサポート以外では使われていないようです。

[1]: https://mesonbuild.com/Dependencies.html#gtest-and-gmock
[2]: https://sr.ht/~lattis/muon/
@ma8ma ma8ma added feature 機能の追加と削除 test テストの変更 build ビルドに関するトピック labels Mar 25, 2023
@ma8ma ma8ma merged commit 67596c6 into master Mar 25, 2023
20 checks passed
@ma8ma ma8ma deleted the meson-use-gtest_main-dependency branch March 25, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build ビルドに関するトピック feature 機能の追加と削除 test テストの変更
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant