From 24033d586e65885284f59bdaa4085b5700395e09 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 4 Jul 2020 15:46:03 -0700 Subject: [PATCH] build: make C++ language conditional We don't need C++ unless we are building the C++ demangler. --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c863f23f..e1e9b42d 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('sysprof', ['c', 'cpp'], +project('sysprof', 'c', license: ['GPL3+', 'GPL2+'], version: '3.37.1', meson_version: '>=0.50.0', @@ -24,7 +24,11 @@ polkit_req_version = '>= 0.105' dazzle_req_version = '>= 3.30.0' cc = meson.get_compiler('c') -cxx = meson.get_compiler('cpp') + +if get_option('libsysprof') + add_languages('cpp') + cxx = meson.get_compiler('cpp') +endif config_h = configuration_data() config_h.set_quoted('API_VERSION_S', '@0@'.format(libsysprof_api_version))