Correcting some build problems with old-style SConscripts
This commit is contained in:
parent
61134833dc
commit
dfd57da14f
3 changed files with 10 additions and 8 deletions
|
|
@ -6,6 +6,11 @@
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
|
Import('build_env')
|
||||||
|
|
||||||
|
include_dir = env.Dir('include').srcnode()
|
||||||
|
env.Append(CPPPATH=[include_dir])
|
||||||
|
build_env.Append(CPPPATH=[include_dir])
|
||||||
|
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
|
|
@ -23,6 +28,5 @@ objs = []
|
||||||
for f in files:
|
for f in files:
|
||||||
objs.append(env.Object(f))
|
objs.append(env.Object(f))
|
||||||
|
|
||||||
env.Append(CPPPATH=[Dir('include').srcnode()])
|
|
||||||
|
|
||||||
gtest = env.Library('gtest', objs)
|
gtest = env.Library('gtest', objs)
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,7 @@ for f in files:
|
||||||
objs.append(env.Object(f))
|
objs.append(env.Object(f))
|
||||||
|
|
||||||
lib = env.Library('charles', files)
|
lib = env.Library('charles', files)
|
||||||
prog = env.Program('charles', [lib, 'charles.cc'])
|
prog = env.Program('charles', ['charles.cc'], LIBS=[lib, 'png'])
|
||||||
env.Alias('charles', prog)
|
env.Alias('charles', prog)
|
||||||
|
|
||||||
|
env.Default('charles')
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,12 @@
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
|
||||||
test_env = env.Clone()
|
|
||||||
test_env.Append(CPPDEFINES='GTEST_USE_OWN_TR1_TUPLE')
|
|
||||||
|
|
||||||
|
|
||||||
subdirs = [
|
subdirs = [
|
||||||
# TODO: Put subdirectories here.
|
# TODO: Put subdirectories here.
|
||||||
]
|
]
|
||||||
|
|
||||||
for d in subdirs:
|
for d in subdirs:
|
||||||
env.SConscript(env.Dir(d).File('SConscript'), {'env': test_env})
|
env.SConscript(env.Dir(d).File('SConscript'), {'env': env})
|
||||||
|
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
|
|
@ -27,5 +23,5 @@ for f in files:
|
||||||
objs.append(env.Object(f))
|
objs.append(env.Object(f))
|
||||||
|
|
||||||
|
|
||||||
prog = test_env.Program('test_charles', files, libs=[gtest, charles])
|
prog = env.Program('test_charles', objs, LIBS=['gtest', 'charles'])
|
||||||
env.Alias('test', prog)
|
env.Alias('test', prog)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue