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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1133>
This commit is contained in:
Nirbheek Chauhan 2021-10-13 13:35:51 +05:30 committed by Seungha Yang
parent 47a53f5063
commit 40fb39502e

View file

@ -1,7 +1,11 @@
project('All GStreamer modules', 'c', project('All GStreamer modules', 'c',
version : '1.19.2.1', version : '1.19.2.1',
meson_version : '>= 0.54.0', 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()) gst_version = '>= @0@'.format(meson.project_version())