aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Dependencies.md7
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