test tracking object file source language - #87
This commit is contained in:
parent
3b00016278
commit
568b78e2e2
7
build_tests/d/link_objects.rb
Normal file
7
build_tests/d/link_objects.rb
Normal file
@ -0,0 +1,7 @@
|
||||
build do
|
||||
Environment.new(echo: :command) do |env|
|
||||
env.Object("main.o", "main.d")
|
||||
env.Object("mod.o", "mod.d")
|
||||
env.Program("hello-d.exe", ["main.o", "mod.o"])
|
||||
end
|
||||
end
|
6
build_tests/simple_cc/link_objects.rb
Normal file
6
build_tests/simple_cc/link_objects.rb
Normal file
@ -0,0 +1,6 @@
|
||||
build do
|
||||
Environment.new do |env|
|
||||
env.Object("simple.o", "simple.cc")
|
||||
env.Program("simple.exe", "simple.o")
|
||||
end
|
||||
end
|
@ -395,6 +395,14 @@ EOF
|
||||
expect(`./simple.exe`).to eq "This is a simple C++ program\n"
|
||||
end
|
||||
|
||||
it "links with the C++ linker when object files were built from C++ sources" do
|
||||
test_dir("simple_cc")
|
||||
result = run_rscons(rsconscript: "link_objects.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(File.exists?("simple.o")).to be_truthy
|
||||
expect(`./simple.exe`).to eq "This is a simple C++ program\n"
|
||||
end
|
||||
|
||||
it 'allows overriding construction variables for individual builder calls' do
|
||||
test_dir('two_sources')
|
||||
result = run_rscons
|
||||
@ -484,6 +492,15 @@ EOF
|
||||
expect(`./hello-d.exe`.rstrip).to eq "Hello from D, value is 42!"
|
||||
end
|
||||
|
||||
it "links with the D linker when object files were built from D sources" do
|
||||
test_dir("d")
|
||||
result = run_rscons(rsconscript: "link_objects.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(File.exists?("main.o")).to be_truthy
|
||||
expect(File.exists?("mod.o")).to be_truthy
|
||||
expect(`./hello-d.exe`.rstrip).to eq "Hello from D, value is 42!"
|
||||
end
|
||||
|
||||
it "does dependency generation for D sources" do
|
||||
test_dir("d")
|
||||
result = run_rscons
|
||||
|
Loading…
x
Reference in New Issue
Block a user