Created
December 19, 2013 17:02
-
-
Save hisui/8042634 to your computer and use it in GitHub Desktop.
"wscript" boilerplate for googletest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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