add configure spec to check multiple set_define's being stored
This commit is contained in:
parent
0e27e967d0
commit
c0a28d0207
8
build_tests/configure/multiple_set_define.rb
Normal file
8
build_tests/configure/multiple_set_define.rb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
configure do
|
||||||
|
check_c_header "math.h", set_define: "HAVE_MATH_H"
|
||||||
|
check_c_header "stdio.h", set_define: "HAVE_STDIO_H"
|
||||||
|
end
|
||||||
|
|
||||||
|
Rscons::Environment.new(echo: :command) do |env|
|
||||||
|
env.Object("simple.o", "simple.c")
|
||||||
|
end
|
@ -1885,6 +1885,17 @@ EOF
|
|||||||
expect(result.stdout).to match /Checking for library 'm'\.\.\. found/
|
expect(result.stdout).to match /Checking for library 'm'\.\.\. found/
|
||||||
expect(result.stdout).to match /Checking for program 'ls'\.\.\. .*ls/
|
expect(result.stdout).to match /Checking for program 'ls'\.\.\. .*ls/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "aggregates multiple set_define's" do
|
||||||
|
test_dir "configure"
|
||||||
|
result = run_rscons(rsconscript: "multiple_set_define.rb", op: "configure")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(result.status).to eq 0
|
||||||
|
result = run_rscons(rsconscript: "multiple_set_define.rb", op: "build")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(result.status).to eq 0
|
||||||
|
expect(result.stdout).to match /gcc.*-o.*\.o.*-DHAVE_MATH_H\s.*-DHAVE_STDIO_H/
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user