aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/cython-c++-intermediate.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/markdown/snippets/cython-c++-intermediate.md b/docs/markdown/snippets/cython-c++-intermediate.md
new file mode 100644
index 0000000..0a1c35f
--- /dev/null
+++ b/docs/markdown/snippets/cython-c++-intermediate.md
@@ -0,0 +1,22 @@
+## Cython can now transpile to C++ as an intermediate language
+
+Built-in cython support currently only allows C as an intermediate language, now
+C++ is also allowed. This can be set via the `cython_language` option, either on
+the command line, or in the meson.build files.
+
+```meson
+project(
+ 'myproject',
+ 'cython',
+ default_options : ['cython_language=cpp'],
+)
+```
+
+or on a per target basis with:
+```meson
+python.extension_module(
+ 'mod',
+ 'mod.pyx',
+ override_options : ['cython_language=cpp'],
+)
+```