Skip to content

Commit 8a5918b

Browse files
committed
Expose double support as an option.
1 parent 924d656 commit 8a5918b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

meson.build

+7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ project('unity', 'c',
2525

2626
build_fixture = get_option('extension_fixture')
2727
build_memory = get_option('extension_memory')
28+
support_double = get_option('support_double')
2829

30+
unity_args = []
2931
unity_src = []
3032
unity_inc = []
3133

@@ -42,8 +44,13 @@ if build_memory
4244
subdir('extras/memory/src')
4345
endif
4446

47+
if support_double
48+
unity_args += '-DUNITY_INCLUDE_DOUBLE'
49+
endif
50+
4551
unity_lib = static_library(meson.project_name(),
4652
sources: unity_src,
53+
c_args: unity_args,
4754
include_directories: unity_inc,
4855
install: not meson.is_subproject(),
4956
)

meson_options.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
option('extension_fixture', type: 'boolean', value: 'false', description: 'Whether to enable the fixture extension.')
22
option('extension_memory', type: 'boolean', value: 'false', description: 'Whether to enable the memory extension.')
3+
option('support_double', type: 'boolean', value: 'false', description: 'Whether to enable double precision floating point assertions.')

0 commit comments

Comments
 (0)