require "rscons"

task :default do
  Rscons::Environment.new do |env|
    env["CPPPATH"] += ["gtest-1.7.0", "gtest-1.7.0/include"]
    env["CXXFLAGS"] << "-pthread"
    env["LIBS"] << "pthread"
    sources = Dir["gtest-1.7.0/src/gtest-all.cc", "*.cc"]
    env.Program("tst", sources)
  end
  system("./tst")
end

task :clean do
  Rscons.clean
end
