summaryrefslogtreecommitdiff
path: root/deps/Unity/examples/example_1/meson.build
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
commit7b3afcaf77f96e7d62f6cd1623ead7f17512d79f (patch)
treeb5f82c64e9c06a84e4d095ab4ac48712e860b673 /deps/Unity/examples/example_1/meson.build
parentb047be5252aeb981faea077409c1768fda0301d9 (diff)
repo init. partial port of existing code
Diffstat (limited to 'deps/Unity/examples/example_1/meson.build')
-rw-r--r--deps/Unity/examples/example_1/meson.build48
1 files changed, 48 insertions, 0 deletions
diff --git a/deps/Unity/examples/example_1/meson.build b/deps/Unity/examples/example_1/meson.build
new file mode 100644
index 0000000..645eeb9
--- /dev/null
+++ b/deps/Unity/examples/example_1/meson.build
@@ -0,0 +1,48 @@
+project('Unity example', 'c',
+ license: 'MIT',
+ default_options: [
+ 'c_std=c99',
+ 'warning_level=3',
+ ],
+ meson_version: '>= 0.49.0'
+)
+
+unity_subproject = subproject('unity')
+unity_dependency = unity_subproject.get_variable('unity_dep')
+unity_gen_runner = unity_subproject.get_variable('gen_test_runner')
+
+src1 = files([
+ 'src' / 'ProductionCode.c',
+ 'test' / 'TestProductionCode.c',
+])
+
+src2 = files([
+ 'src' / 'ProductionCode2.c',
+ 'test' / 'TestProductionCode2.c',
+])
+
+inc = include_directories('src')
+
+test1 = executable('test1',
+ sources: [
+ src1,
+ unity_gen_runner.process('test' / 'TestProductionCode.c')
+ ],
+ include_directories: [ inc ],
+ dependencies: [ unity_dependency ],
+)
+
+test('test1', test1,
+ should_fail: true)
+
+test2 = executable('test2',
+ sources: [
+ src2,
+ unity_gen_runner.process('test' / 'TestProductionCode2.c')
+ ],
+ include_directories: [ inc ],
+ dependencies: [ unity_dependency ],
+)
+
+test('test2', test2)
+