Commit 68b81862 authored by Javier Jardón's avatar Javier Jardón
Browse files

build: Use meson style for build options

parent de7ceae9
......@@ -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".
......@@ -70,7 +70,7 @@ test_c_args = [
if get_option('buildtype') != 'plain'
test_c_args += '-fstack-protector-strong'
if get_option('enable_profiling')
if get_option('profiling')
test_c_args += '-pg'
......@@ -108,6 +108,6 @@ subdir('tools')
if get_option('enable_gtk_doc')
if get_option('gtk-doc')
# 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'
type: 'boolean', value: false,
description: 'Whether to generate the API reference for Dazzle')
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
......@@ -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: '',
......@@ -79,7 +79,7 @@ libdazzle_deps = [
libdazzle_args = []
if get_option('enable_rdtscp')
if get_option('rdtscp')
libdazzle_args += '-DDZL_HAVE_RDTSCP'
......@@ -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],
if get_option('enable_tests')
if get_option('tests')
test_env = [
if get_option('enable_tools')
if get_option('tools')
# Counters are UNIX-systems only currently
if host_machine.system() != 'windows'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment