diff options
author | Raphael Salamon <killekulla@rdrz.de> | 2018-01-16 22:29:49 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-02-19 01:32:16 +0530 |
commit | 2518704a7008886b917e894957abb90610c941c3 (patch) | |
tree | 50b4984ec23d69f0ea4c583d8d1ce6448ddc0f1c | |
parent | 8cff84a26a03993d35ea55a8f41143b5c00eebd0 (diff) | |
download | meson-2518704a7008886b917e894957abb90610c941c3.zip meson-2518704a7008886b917e894957abb90610c941c3.tar.gz meson-2518704a7008886b917e894957abb90610c941c3.tar.bz2 |
docs: Document the `main` keyword of the `gtest` framework dependency
-rw-r--r-- | docs/markdown/Dependencies.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index b36d275..189db72 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -144,6 +144,13 @@ pass `gtest` or `gmock` to `dependency` and it will do everything for you. If you want to use GMock, it is recommended to use GTest as well, as getting it to work standalone is tricky. +You can set the `main` keyword argument to `true` to use the `main()` +function provided by GTest: +``` +gtest_dep = dependency('gtest', main : true, required : false) +e = executable('testprog', 'test.cc', dependencies : gtest_dep) +test('gtest test', e) +``` ## MPI MPI is supported for C, C++ and Fortran. Because dependencies are |