Place object files for absolute source paths under build_root - close #30

This commit is contained in:
josh committed 2017-05-29 12:16:46 -04:00
1 parent 1880e6650e
commit 8cbb9fa30e
6 files changed
+68 -7

No files matched your search

@@ -0,0 +1,14 @@
Rscons::Environment.new do |env|
env.build_root = "build"
tempdir = ENV["TEMP"] || ENV["TMP"] || "/tmp"
source_file = File.join(tempdir, "abs.c")
File.open(source_file, "w") do |fh|
fh.puts(<<-EOF)
int main()
{
return 29;
}
EOF
end
env.Program("abs.exe", source_file)
end