Skip to content

Instantly share code, notes, and snippets.

@hisui
Created December 19, 2013 17:02
Show Gist options
  • Save hisui/8042634 to your computer and use it in GitHub Desktop.
Save hisui/8042634 to your computer and use it in GitHub Desktop.
"wscript" boilerplate for googletest.
def options(ctx):
ctx.load('compiler_cxx')
def configure(ctx):
ctx.env.CXX = 'clang++'
ctx.load('compiler_cxx')
def build(ctx):
ctx(target='mylib',
source=ctx.path.ant_glob('src/*.cpp'),
features='cxx cxxstlib',
cxxflags=['-std=c++11', '-stdlib=libc++'],
)
ctx(target='gtest',
source='gtest-1.7.0/src/gtest-all.cc',
features='cxx cxxstlib',
includes='gtest-1.7.0 gtest-1.7.0/include',
linkflags=['-pthread'],
)
ctx(target='mylib-test', use='mylib gtest',
source=ctx.path.ant_glob('test/*.cpp'),
features='cxx cxxprogram',
includes='test src gtest-1.7.0/include',
cxxflags=['-std=c++11', '-stdlib=libc++'],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment