From 40fb39502ea497ea7be4d1d03a5c6bae8dd8b871 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 13 Oct 2021 13:35:51 +0530 Subject: [PATCH] meson: Define cpp_std in the top-level project() Due to a bug, meson ignores ${lang}_std settings in default_options for subprojects: https://github.com/mesonbuild/meson/issues/1889 This causes build failures when a subproject requires c++11 or c++14, etc. Compilers that support those cpp_stds are very common, and all the toolchains that we support include c++ compilers, so we can add cpp_std=c++14 to the top-level. This fixes the webrtc-audio-processing build on Linux, and harfbuzz on macOS. Part-of: --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c10098a9c7..4a0108c3b9 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,11 @@ project('All GStreamer modules', 'c', version : '1.19.2.1', meson_version : '>= 0.54.0', - default_options : ['buildtype=debugoptimized']) + default_options : ['buildtype=debugoptimized', + # Needed due to https://github.com/mesonbuild/meson/issues/1889, + # but this can cause problems in the future. Remove it + # when it's no longer necessary. + 'cpp_std=c++14']) gst_version = '>= @0@'.format(meson.project_version())