[sysprof] build: make C++ language conditional



commit 24033d586e65885284f59bdaa4085b5700395e09
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 4 15:46:03 2020 -0700

    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 c863f23..e1e9b42 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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]