diff --git a/lib/gtest/SConscript b/lib/gtest/SConscript index 42a81b0..814a72e 100644 --- a/lib/gtest/SConscript +++ b/lib/gtest/SConscript @@ -6,6 +6,7 @@ import os.path Import('env') +Import('build_env') files = [ @@ -23,6 +24,8 @@ objs = [] for f in files: objs.append(env.Object(f)) -env.Append(CPPPATH=[Dir('include').srcnode()]) +include_dir = Dir('include').srcnode() +env.Append(CPPPATH=[include_dir]) +build_env.Append(CPPPATH=[include_dir]) gtest = env.Library('gtest', objs) diff --git a/test/SConscript b/test/SConscript index f0639e5..0f6a24b 100644 --- a/test/SConscript +++ b/test/SConscript @@ -18,8 +18,12 @@ for d in subdirs: files = [ # TODO: Put files here. + 'main.cc', ] objs = [] for f in files: objs.append(env.Object(f)) + +# TODO: Add the library target for the package to test to LIBS. +env.Program('test', objs, LIBS=['gtest']) diff --git a/test/main.cc b/test/main.cc new file mode 100644 index 0000000..76cfc21 --- /dev/null +++ b/test/main.cc @@ -0,0 +1,16 @@ +/* main.cc + * Eryn Wells > + */ + +/** Basic driver for unit tests. */ + +#include "gtest/gtest.h" + + +int +main(int argc, + char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +}