mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
Add generator code to build file and make script executable
This commit is contained in:
2
auto/generate_test_runner.rb
Normal file → Executable file
2
auto/generate_test_runner.rb
Normal file → Executable file
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/ruby
|
||||||
|
|
||||||
# ==========================================
|
# ==========================================
|
||||||
# Unity Project - A Test Framework for C
|
# Unity Project - A Test Framework for C
|
||||||
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
||||||
|
|||||||
12
meson.build
12
meson.build
@@ -12,3 +12,15 @@ project('unity', 'c',
|
|||||||
|
|
||||||
subdir('src')
|
subdir('src')
|
||||||
unity_dep = declare_dependency(link_with: unity_lib, include_directories: unity_dir)
|
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