[folks/wip/nielsdg/reenable-profiling-code] meson: Add option to build profiling code
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/wip/nielsdg/reenable-profiling-code] meson: Add option to build profiling code
- Date: Thu, 3 Oct 2019 20:42:07 +0000 (UTC)
commit 1fd554cc3c732d70693e8d3dda5072fa3466b5f1
Author: Niels De Graef <nielsdegraef gmail com>
Date: Thu Oct 3 22:40:06 2019 +0200
meson: Add option to build profiling code
This is a regression after poritng the build system from Autotools to
Meson.
Fixes https://gitlab.gnome.org/GNOME/folks/issues/115
folks/meson.build | 7 +++++++
meson_options.txt | 2 ++
2 files changed, 9 insertions(+)
---
diff --git a/folks/meson.build b/folks/meson.build
index 25fb974c..e3700509 100644
--- a/folks/meson.build
+++ b/folks/meson.build
@@ -13,10 +13,17 @@ libfolks_internal_deps = [
posix_dep,
]
+libfolks_internal_vala_flags = []
+
+if get_option('profiling')
+ libfolks_internal_vala_flags += '-DENABLE_PROFILING'
+endif
+
libfolks_internal = static_library('folks-internal',
libfolks_internal_sources,
include_directories: include_directories('..'),
dependencies: libfolks_internal_deps,
+ vala_args: libfolks_internal_vala_flags,
)
libfolks_internal_dep = declare_dependency(
diff --git a/meson_options.txt b/meson_options.txt
index 042a72e8..43cd586a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,6 +8,8 @@ option('zeitgeist', type: 'boolean', value: false, description: 'build Zeitgeist
# Tools
option('import_tool', type: 'boolean', value: true, description: 'Enable building the meta-contact import
tool')
option('inspect_tool', type: 'boolean', value: true, description: 'Enable building the data inspection tool')
+# Profiling
+option('profiling', type: 'boolean', value: false, description: 'Enable profiling code')
# Test options
option('installed_tests', type: 'boolean', value: false, description: 'Install test programs')
# Docs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]