aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Dependencies.md16
-rw-r--r--docs/markdown/snippets/cuda_dependency.md11
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 49c0962..a3ae199 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -285,6 +285,22 @@ environment variables.
You can set the argument `threading` to `single` to use boost
libraries that have been compiled for single-threaded use instead.
+## CUDA
+
+*(added 0.53.0)*
+
+Enables compiling and linking against the CUDA Toolkit. The `version`
+and `modules` keywords may be passed to request the use of a specific
+CUDA Toolkit version and/or additional CUDA libraries, correspondingly:
+
+```meson
+dep = dependency('cuda', version : '>=10', modules : ['cublas'])
+```
+
+Note that explicitly adding this dependency is only necessary if you are
+using CUDA Toolkit from a C/C++ file or project, or if you are utilizing
+additional toolkit libraries that need to be explicitly linked to.
+
## CUPS
`method` may be `auto`, `config-tool`, `pkg-config`, `cmake` or `extraframework`.
diff --git a/docs/markdown/snippets/cuda_dependency.md b/docs/markdown/snippets/cuda_dependency.md
new file mode 100644
index 0000000..1cc9ae6
--- /dev/null
+++ b/docs/markdown/snippets/cuda_dependency.md
@@ -0,0 +1,11 @@
+## CUDA dependency
+
+Native support for compiling and linking against the CUDA Toolkit using
+the `dependency` function:
+
+```meson
+project('CUDA test', 'cpp', meson_version: '>= 0.53.0')
+exe = executable('prog', 'prog.cc', dependencies: dependency('cuda'))
+```
+
+See [the CUDA dependency](Dependencies.md#cuda) for more information.