[libdazzle/jjardon/meson_options] build: Use meson style for build options
- From: Javier Jardón Cabezas <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle/jjardon/meson_options] build: Use meson style for build options
- Date: Sun, 10 Sep 2017 12:26:50 +0000 (UTC)
commit 68b81862b80c0433be018e1bc2950a20173a968f
Author: Javier Jardón <jjardon gnome org>
Date: Sun Sep 10 12:54:41 2017 +0100
build: Use meson style for build options
CONTRIBUTING.md | 2 +-
meson.build | 4 ++--
meson_options.txt | 16 ++++++++--------
src/meson.build | 8 ++++----
tests/meson.build | 2 +-
tools/meson.build | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1fcc2e7..bce8cd6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -16,7 +16,7 @@ Not everything we have in the code base has tests, and ideally that will improve
## Troubleshooting
-If you configure the meson project with `-Denable_tracing=true` then libdazzle with be built with tracing.
+If you configure the meson project with `-Dtracing=true` then libdazzle with be built with tracing.
This allows various parts of the code to use `DZL_ENTRY`, `DZL_EXIT` and other tracing macros to log
function calls.
You might find this useful in tracking down difficult re-entrancy or simply learn "how does this work".
diff --git a/meson.build b/meson.build
index 506f207..a43fc68 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,7 @@ test_c_args = [
if get_option('buildtype') != 'plain'
test_c_args += '-fstack-protector-strong'
endif
-if get_option('enable_profiling')
+if get_option('profiling')
test_c_args += '-pg'
endif
@@ -108,6 +108,6 @@ subdir('tools')
subdir('tests')
subdir('examples/app')
-if get_option('enable_gtk_doc')
+if get_option('gtk-doc')
subdir('doc')
endif
diff --git a/meson_options.txt b/meson_options.txt
index f4232bc..8932a4c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,27 +1,27 @@
# Performance and debugging related options
-option('enable_tracing', type: 'boolean', value: false)
-option('enable_profiling', type: 'boolean', value: false)
-option('enable_rdtscp', type: 'boolean', value: false,
+option('tracing', type: 'boolean', value: false)
+option('profiling', type: 'boolean', value: false)
+option('rdtscp', type: 'boolean', value: false,
description: 'Use intel rdtscp haswell instruction for performance counters'
)
-option('enable_tools', type: 'boolean', value: true,
+option('tools', type: 'boolean', value: true,
description: 'Whether helper tools should be installed')
# Support for multiple languages
-option('with_introspection', type: 'boolean', value: true)
-option('with_vapi', type: 'boolean', value: true)
+option('introspection', type: 'boolean', value: true)
+option('vapi', type: 'boolean', value: true)
# Subproject
option('package_subdir', type: 'string',
description: 'Subdirectory to append to all installed files, for use as subproject'
)
-option('enable_gtk_doc',
+option('gtk-doc',
type: 'boolean', value: false,
description: 'Whether to generate the API reference for Dazzle')
-option('enable_tests',
+option('tests',
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
diff --git a/src/meson.build b/src/meson.build
index 6a4a785..2bfd1e9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -23,7 +23,7 @@ dzl_version_h = configure_file(
configuration: version_data)
debug_data = configuration_data()
-debug_data.set10('ENABLE_TRACING', get_option('enable_tracing'))
+debug_data.set10('ENABLE_TRACING', get_option('tracing'))
dzl_debug_h = configure_file(
input: 'dzl-debug.h.in',
@@ -79,7 +79,7 @@ libdazzle_deps = [
]
libdazzle_args = []
-if get_option('enable_rdtscp')
+if get_option('rdtscp')
libdazzle_args += '-DDZL_HAVE_RDTSCP'
endif
@@ -110,7 +110,7 @@ libdazzle_dep = declare_dependency(
include_directories: include_directories('.'),
)
-if get_option('with_introspection')
+if get_option('introspection')
libdazzle_gir = gnome.generate_gir(libdazzle,
sources: libdazzle_generated_headers + libdazzle_public_headers + libdazzle_public_sources,
@@ -126,7 +126,7 @@ if get_option('with_introspection')
extra_args: [ '--c-include=dazzle.h', '--quiet' ],
)
- if get_option('with_vapi')
+ if get_option('vapi')
libdazzle_vapi = gnome.generate_vapi('libdazzle-' + apiversion,
sources: libdazzle_gir[0],
diff --git a/tests/meson.build b/tests/meson.build
index 17d32cb..e22e1e1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,4 +1,4 @@
-if get_option('enable_tests')
+if get_option('tests')
test_env = [
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
diff --git a/tools/meson.build b/tools/meson.build
index a64a152..d48809b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -1,4 +1,4 @@
-if get_option('enable_tools')
+if get_option('tools')
# Counters are UNIX-systems only currently
if host_machine.system() != 'windows'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]