add Environment#clone() and a build test for it
This commit is contained in:
1 parent
c9f6bdb2e2
commit
b8acc74b5d
4 files changed
+45
No files matched your search
@@ -0,0 +1,11 @@
|
||||
debug = Rscons::Environment.new do |env|
|
||||
env.build_dir('src', 'debug')
|
||||
env['CFLAGS'] = '-O2'
|
||||
env['CPPFLAGS'] = '-DSTRING="Debug Version"'
|
||||
env.Program('program-debug', Dir['src/*.c'])
|
||||
end
|
||||
|
||||
release = debug.clone('CPPFLAGS' => '-DSTRING="Release Version"') do |env|
|
||||
env.build_dir('src', 'release')
|
||||
env.Program('program-release', Dir['src/*.c'])
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("Hello, %s\n", STRING);
|
||||
}
|
||||
Reference in new issue
Block a user