diff --git a/meson.build b/meson.build index 6585129..e16bce0 100644 --- a/meson.build +++ b/meson.build @@ -34,14 +34,13 @@ unity_inc = [] subdir('src') if build_fixture - # Building the fixture extension implies building the memory - # extension. - build_memory = true subdir('extras/fixture/src') 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 diff --git a/meson_options.txt b/meson_options.txt index 8e66784..069b19d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +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.') +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.')