Specify customization with meson options
Meson options can now be used to pass custom parameters. The default
values are still used if unset for other build systems.
Previously -D arguments were not being used by Meson when determining
sizeof for libmctp-sizes.h, since arguments are ignored for compiler
flags. Instead the options are now passed explicitly.
Change-Id: I04cfff40fab03b8ccbca33acdf2b5abb30723e5b
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/meson.options b/meson.options
index ff0b0e6..a3fa5b4 100644
--- a/meson.options
+++ b/meson.options
@@ -1,4 +1,3 @@
-option('tests', type: 'feature', value: 'enabled', description: 'Build tests')
option(
'bindings',
type: 'array',
@@ -7,17 +6,11 @@
value: ['serial', 'astlpc', 'i2c'],
)
option(
- 'default_alloc',
- type: 'feature',
- description: 'Use libc malloc and free for heap memory',
+ 'control',
+ type: 'boolean',
+ value: true,
+ description: 'Include MCTP control protocol handler',
)
-option('stdio', type: 'feature', description: 'Support logging to stdio')
-option(
- 'fileio',
- type: 'feature',
- description: 'Support interfaces based on file-descriptors',
-)
-option('syslog', type: 'feature', description: 'Support logging to syslog')
option(
'custom_alloc',
type: 'boolean',
@@ -25,14 +18,56 @@
description: 'Use fixed application-provided allocators',
)
option(
+ 'default_alloc',
+ type: 'feature',
+ description: 'Use libc malloc and free for heap memory',
+)
+option(
+ 'default_clock_gettime',
+ type: 'boolean',
+ value: true,
+ description: 'Use clock_gettime() for time',
+)
+option(
+ 'fileio',
+ type: 'feature',
+ description: 'Support interfaces based on file-descriptors',
+)
+option(
'nolog',
type: 'boolean',
value: false,
description: 'Don\'t include any logging functionality',
)
+option('stdio', type: 'feature', description: 'Support logging to stdio')
+option('syslog', type: 'feature', description: 'Support logging to syslog')
+option('tests', type: 'feature', value: 'enabled', description: 'Build tests')
+
+
option(
- 'control',
- type: 'boolean',
- value: true,
- description: 'Include MCTP control protocol handler',
+ 'max_message_size',
+ type: 'integer',
+ value: 65536,
+ description: 'Maximum message size',
+)
+option(
+ 'reassembly_contexts',
+ type: 'integer',
+ value: 16,
+ description: 'Number of concurrent reassembly contexts',
+)
+option(
+ 'request_tags',
+ type: 'integer',
+ value: 16,
+ description: 'Number of outbound request tags',
+)
+
+
+option('i2c_mtu', type: 'integer', value: 64, description: 'I2C packet MTU')
+option(
+ 'i2c_neigh_count',
+ type: 'integer',
+ value: 4,
+ description: 'I2C neighbour table size',
)