1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Merge pull request #551 from pmembrey/add-meson-generator-for-test-runner

Enhance meson support so that it can automatically generate a test runner
This commit is contained in:
Mark VanderVoord
2023-02-06 14:56:17 -05:00
committed by GitHub
3 changed files with 32 additions and 0 deletions

View File

@@ -11,3 +11,15 @@ project('unity', 'c',
subdir('src')
unity_dep = declare_dependency(link_with: unity_lib, include_directories: unity_dir)
# Get the generate_test_runner script relative to itself or the parent project if it is being used as a subproject
# NOTE: This could be (and probably is) a complete hack - but I haven't yet been able to find a better way....
if meson.is_subproject()
gen_test_runner_path = find_program(meson.source_root() / 'subprojects/unity/auto/generate_test_runner.rb')
else
gen_test_runner_path = find_program('subprojects/unity/auto/generate_test_runner.rb')
endif
# Create a generator that we can access from the parent project
gen_test_runner = generator(gen_test_runner_path, output: '@BASENAME@_Runner.c', arguments: ['@INPUT@', '@OUTPUT@'] )