add :check_cpppath option to check_c_header and check_cxx_header

configuration methods
add :check_d_import_path option to check_d_import configuration method - #107
This commit is contained in:
josh committed 2019-07-09 23:53:17 -04:00
1 parent 3aac190ad6
commit 6e590b62a6
5 files changed
+123 -6

No files matched your search

+45
View File
@@ -1835,6 +1835,21 @@ EOF
expect(result.status).to eq 0
expect(result.stdout).to_not match /-DHAVE_/
end
it "modifies CPPPATH based on check_cpppath" do
test_dir "configure"
FileUtils.mkdir_p("usr1")
FileUtils.mkdir_p("usr2")
File.open("usr2/frobulous.h", "wb") do |fh|
fh.puts("#define FOO 42")
end
result = run_rscons(rsconscript: "check_c_header_cpppath.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
result = run_rscons(rsconscript: "check_c_header_cpppath.rb", rscons_args: %w[-v])
expect(result.stdout).to_not match %r{-I./usr1}
expect(result.stdout).to match %r{-I./usr2}
end
end
context "check_cxx_header" do
@@ -1861,6 +1876,21 @@ EOF
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for C\+\+ header 'not___found\.h'... not found/
end
it "modifies CPPPATH based on check_cpppath" do
test_dir "configure"
FileUtils.mkdir_p("usr1")
FileUtils.mkdir_p("usr2")
File.open("usr2/frobulous.h", "wb") do |fh|
fh.puts("#define FOO 42")
end
result = run_rscons(rsconscript: "check_cxx_header_cpppath.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
result = run_rscons(rsconscript: "check_cxx_header_cpppath.rb", rscons_args: %w[-v])
expect(result.stdout).to_not match %r{-I./usr1}
expect(result.stdout).to match %r{-I./usr2}
end
end
context "check_d_import" do
@@ -1887,6 +1917,21 @@ EOF
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for D import 'not\.found'... not found/
end
it "modifies D_IMPORT_PATH based on check_d_import_path" do
test_dir "configure"
FileUtils.mkdir_p("usr1")
FileUtils.mkdir_p("usr2")
File.open("usr2/frobulous.d", "wb") do |fh|
fh.puts("int foo = 42;")
end
result = run_rscons(rsconscript: "check_d_import_d_import_path.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
result = run_rscons(rsconscript: "check_d_import_d_import_path.rb", rscons_args: %w[-v])
expect(result.stdout).to_not match %r{-I./usr1}
expect(result.stdout).to match %r{-I./usr2}
end
end
context "check_lib" do