Skip to content

Commit

Permalink
Merge pull request #684 from detly/expose_assert_options
Browse files Browse the repository at this point in the history
Expose double support as an option.
  • Loading branch information
mvandervoord authored Jul 13, 2023
2 parents 924d656 + 8a5918b commit 1b9199e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand All @@ -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(),
)
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -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.')

0 comments on commit 1b9199e

Please sign in to comment.