add build system and main.cc

This commit is contained in:
Josh Holtrop 2014-06-03 19:49:38 -04:00
parent 6476dc5e77
commit 6c2ffa1b60
4 changed files with 30 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.rsconscache
/tst

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
default:
%:
rake $@

15
Rakefile.rb Normal file
View File

@ -0,0 +1,15 @@
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
end
task :clean do
Rscons.clean
end

9
main.cc Normal file
View File

@ -0,0 +1,9 @@
#include <iostream>
#include "gtest/gtest.h"
using namespace std;
int main(int argc, char * argv[])
{
cout << "hi" << endl;
}