From 8a5918b81d313fc902c7b51fdf7070f7d09435d0 Mon Sep 17 00:00:00 2001 From: Jason Heeris Date: Thu, 13 Jul 2023 14:53:21 +0800 Subject: [PATCH] Expose double support as an option. --- meson.build | 7 +++++++ meson_options.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/meson.build b/meson.build index c5cf971..6585129 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,9 @@ project('unity', 'c', build_fixture = get_option('extension_fixture') build_memory = get_option('extension_memory') +support_double = get_option('support_double') +unity_args = [] unity_src = [] unity_inc = [] @@ -42,8 +44,13 @@ if build_memory subdir('extras/memory/src') endif +if support_double + unity_args += '-DUNITY_INCLUDE_DOUBLE' +endif + unity_lib = static_library(meson.project_name(), sources: unity_src, + c_args: unity_args, include_directories: unity_inc, install: not meson.is_subproject(), ) diff --git a/meson_options.txt b/meson_options.txt index fbb66d7..8e66784 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,3 @@ option('extension_fixture', type: 'boolean', value: 'false', description: 'Whether to enable the fixture extension.') option('extension_memory', type: 'boolean', value: 'false', description: 'Whether to enable the memory extension.') +option('support_double', type: 'boolean', value: 'false', description: 'Whether to enable double precision floating point assertions.')