aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 88dbe8c..6eb99a3 100644
--- a/meson.build
+++ b/meson.build
@@ -22,8 +22,9 @@ cc = meson.get_compiler('c')
# Enable C++ support if we're building the examples
if get_option('examples') or get_option('tests')
- add_languages(['cpp'])
- cpp = meson.get_compiler('cpp')
+ if add_languages(['cpp'], required: false)
+ cpp = meson.get_compiler('cpp')
+ endif
endif
# Enable Objective C support if we're building for MacOS