mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Add generator code to build file and make script executable
This commit is contained in:
12
meson.build
12
meson.build
@@ -12,3 +12,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@'] )
|
||||
|
||||
Reference in New Issue
Block a user