update build_tests_spec to invoke rscons in a subprocess for each test
This commit is contained in:
1 parent
2d8e08b493
commit
28e56251dd
45 files changed
+690
-614
No files matched your search
@@ -0,0 +1,12 @@
|
||||
debug = Rscons::Environment.new(echo: :command) do |env|
|
||||
env.build_dir('src', 'debug')
|
||||
env['CFLAGS'] = '-O2'
|
||||
env['CPPFLAGS'] = '-DSTRING="Debug Version"'
|
||||
env.Program('program-debug.exe', Dir['src/*.c'])
|
||||
end
|
||||
|
||||
release = debug.clone do |env|
|
||||
env["CPPFLAGS"] = '-DSTRING="Release Version"'
|
||||
env.build_dir('src', 'release')
|
||||
env.Program('program-release.exe', Dir['src/*.c'])
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
env1 = Rscons::Environment.new(echo: :command) do |env|
|
||||
env.build_dir('src', 'build')
|
||||
env['CFLAGS'] = '-O2'
|
||||
env.add_build_hook do |build_op|
|
||||
build_op[:vars]['CPPFLAGS'] = '-DSTRING="Hello"'
|
||||
end
|
||||
env.add_post_build_hook do |build_op|
|
||||
$stdout.puts "post #{build_op[:target]}"
|
||||
end
|
||||
env.Program('program.exe', Dir['src/*.c'])
|
||||
end
|
||||
|
||||
env2 = env1.clone(clone: :all) do |env|
|
||||
env.Program('program2.exe', Dir['src/*.c'])
|
||||
end
|
||||
Reference in new issue
Block a user