add Rscons::BuildTarget

Return a BuildTarget object from Environment#method_missing when a build target is registered.
This commit is contained in:
josh committed 2014-06-12 13:31:17 -04:00
1 parent 87b25d7bfd
commit 1b50a9dd3c
8 files changed
+69 -15

No files matched your search

+2 -2
View File
@@ -5,13 +5,13 @@ module Rscons
subject {Program.new}
it "supports overriding CC construction variable" do
subject.should_receive(:standard_build).with("LD prog#{env["PROGSUFFIX"]}", "prog#{env["PROGSUFFIX"]}", ["sp-c++", "-o", "prog#{env["PROGSUFFIX"]}", "prog.o"], ["prog.o"], env, :cache)
subject.should_receive(:standard_build).with("LD prog", "prog", ["sp-c++", "-o", "prog", "prog.o"], ["prog.o"], env, :cache)
subject.run("prog", ["prog.o"], :cache, env, "CC" => "sp-c++")
end
it "supports overriding LDCMD construction variable" do
subject.should_receive(:standard_build).with("LD prog.exe", "prog.exe", ["special", "LD!", "prog.o"], ["prog.o"], env, :cache)
subject.run("prog", ["prog.o"], :cache, env, "LDCMD" => ["special", "LD!", "${_SOURCES}"])
subject.run("prog.exe", ["prog.o"], :cache, env, "LDCMD" => ["special", "LD!", "${_SOURCES}"])
end
end
end