Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ project('unity', 'c',
build_fixture = get_option('extension_fixture')
build_memory = get_option('extension_memory')
support_double = get_option('support_double')
fixture_help_message = get_option('fixture_help_message')

unity_args = []
unity_src = []
Expand All @@ -34,14 +35,16 @@ unity_inc = []
subdir('src')

if build_fixture
# Building the fixture extension implies building the memory
# extension.
build_memory = true
subdir('extras/fixture/src')
if fixture_help_message != ''
unity_args += '-DUNITY_CUSTOM_HELP_MSG=' + fixture_help_message
endif
endif

if build_memory
if build_memory.enabled() or (build_memory.auto() and build_fixture)
subdir('extras/memory/src')
else
unity_args += '-DUNITY_FIXTURE_NO_EXTRAS'
endif

if support_double
Expand Down
7 changes: 4 additions & 3 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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.')
option('extension_fixture', type: 'boolean', value: false, description: 'Whether to enable the fixture extension.')
option('extension_memory', type: 'feature', value: 'auto', description: 'Whether to enable the memory extension. By default this is automatically enabled when extension_fixture is enabled.')
option('support_double', type: 'boolean', value: false, description: 'Whether to enable double precision floating point assertions.')
option('fixture_help_message', type: 'string', description: 'If the fixture extension is enabled, this allows a custom help message to be defined.')