From ae10bd1268e20e6b12860780e164d452939a900f Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 Jun 2022 13:40:24 -0400 Subject: [PATCH 1/3] examples: meson: do not use deprecated test naming style Tests cannot contain a ":", and configuring the example produced the following warning: test/test_runners/meson.build:12: DEPRECATION: ":" is not allowed in test name "Running: 01-test-case", it has been replaced with "_" test/test_runners/meson.build:13: DEPRECATION: ":" is not allowed in test name "Running: 02-test-case", it has been replaced with "_" In this case, the "running" part is redundant, so remove it. --- examples/example_4/test/test_runners/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/example_4/test/test_runners/meson.build b/examples/example_4/test/test_runners/meson.build index f2a43c1..1503c5f 100644 --- a/examples/example_4/test/test_runners/meson.build +++ b/examples/example_4/test/test_runners/meson.build @@ -5,9 +5,9 @@ # license: MIT # cases = [ - ['TestProductionCode_Runner.c', join_paths('..' ,'TestProductionCode.c' )], + ['TestProductionCode_Runner.c', join_paths('..' ,'TestProductionCode.c' )], ['TestProductionCode2_Runner.c', join_paths('..' ,'TestProductionCode2.c')] ] -test('Running: 01-test-case', executable('01-test-case', cases[0], dependencies: [ a_dep, unity_dep ])) -test('Running: 02-test-case', executable('02-test-case', cases[1], dependencies: [ b_dep, unity_dep ])) +test('01-test-case', executable('01-test-case', cases[0], dependencies: [ a_dep, unity_dep ])) +test('02-test-case', executable('02-test-case', cases[1], dependencies: [ b_dep, unity_dep ])) From 0129cf5b11c111f389f59677aec01766086856ee Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 Jun 2022 13:41:58 -0400 Subject: [PATCH 2/3] meson: specify correct minimum versions of Meson The main project doesn't really have any specific version requirement. Specify a very low one just in case -- 0.37.0 is old enough to cover probably any existing use of Meson anywhere in the wild, and coincidentally is also the version that Meson started adding feature warnings for, to notify you if you use too-new features. The example *does* depend on a specific version. It needs 0.55.0 in order to use subproject wrap dependency fallback instead of the legacy style of specifying the name of the variable as a fallback. Ensure that is used. --- examples/example_4/meson.build | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example_4/meson.build b/examples/example_4/meson.build index 862e231..b1c4e85 100644 --- a/examples/example_4/meson.build +++ b/examples/example_4/meson.build @@ -4,7 +4,7 @@ # # license: MIT # -project('example-4', 'c') +project('example-4', 'c', meson_version: '>= 0.55.0') unity_dep = dependency('unity') diff --git a/meson.build b/meson.build index 4b9f6e7..f5affb4 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ # license: MIT # project('unity', 'c', - meson_version: '>=0.62.0', + meson_version: '>=0.37.0', default_options: ['werror=true', 'c_std=c11']) subdir('src') From 1b131552445e9eabcabc07c600fe7a3749ff7108 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 Jun 2022 13:49:52 -0400 Subject: [PATCH 3/3] meson: include the license info in the project definition This is useful to help convey the usage rights and e.g. generate a Software Bill of Materials. --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index f5affb4..ce99ae3 100644 --- a/meson.build +++ b/meson.build @@ -5,6 +5,7 @@ # license: MIT # project('unity', 'c', + license: 'MIT', meson_version: '>=0.37.0', default_options: ['werror=true', 'c_std=c11'])