[gnome-software] Make valgrind integration disableable by -Denable-valgrind=false
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Make valgrind integration disableable by -Denable-valgrind=false
- Date: Mon, 8 May 2017 11:48:20 +0000 (UTC)
commit 6be1218ea1d19ed6a5f25b2cc9d2170741277903
Author: Iain Lane <iain orangesquash org uk>
Date: Mon May 8 12:47:30 2017 +0100
Make valgrind integration disableable by -Denable-valgrind=false
lib/gs-plugin.c | 2 ++
meson.build | 9 ++++++++-
meson_options.txt | 1 +
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index dc29e56..f46dbd1 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -47,7 +47,9 @@
#include <gio/gdesktopappinfo.h>
#include <gdk/gdk.h>
+#ifdef USE_VALGRIND
#include <valgrind.h>
+#endif
#include "gs-app-list-private.h"
#include "gs-os-release.h"
diff --git a/meson.build b/meson.build
index 1075150..4e27615 100644
--- a/meson.build
+++ b/meson.build
@@ -99,7 +99,14 @@ libm = cc.find_library('libm', required: false)
libsecret = dependency('libsecret-1')
libsoup = dependency('libsoup-2.4', version : '>= 2.51.92')
sqlite3 = dependency('sqlite3')
-valgrind = dependency('valgrind')
+
+if get_option('enable-valgrind')
+ valgrind = dependency('valgrind')
+ conf.set('USE_VALGRIND', 1)
+else
+ message('Valgrind integration disabled')
+ valgrind = []
+endif
if get_option('enable-gnome-desktop')
gnome_desktop = dependency('gnome-desktop-3.0', version : '>= 3.17.92')
diff --git a/meson_options.txt b/meson_options.txt
index 9fb3cc9..a91179c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -17,3 +17,4 @@ option('enable-webapps', type : 'boolean', value : true, description : 'enable w
option('enable-gudev', type : 'boolean', value : true, description : 'enable GUdev support')
option('enable-snap', type : 'boolean', value : false, description : 'enable Snap support')
option('enable-external-appstream', type : 'boolean', value : false, description : 'enable external
AppStream support')
+option('enable-valgrind', type : 'boolean', value : true, description : 'enable Valgrind debugging
integration')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]