SConscript (9618:d57e7fe9f2a2) SConscript (9930:7cc44c7913f2)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 232 unchanged lines hidden (view full) ---

241 super(ProtoBuf, self).__init__(source, **guards)
242
243 # Get the file name and the extension
244 modname,ext = self.extname
245 assert ext == 'proto'
246
247 # Currently, we stick to generating the C++ headers, so we
248 # only need to track the source and header.
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 232 unchanged lines hidden (view full) ---

241 super(ProtoBuf, self).__init__(source, **guards)
242
243 # Get the file name and the extension
244 modname,ext = self.extname
245 assert ext == 'proto'
246
247 # Currently, we stick to generating the C++ headers, so we
248 # only need to track the source and header.
249 self.cc_file = File(joinpath(self.dirname, modname + '.pb.cc'))
250 self.hh_file = File(joinpath(self.dirname, modname + '.pb.h'))
249 self.cc_file = File(modname + '.pb.cc')
250 self.hh_file = File(modname + '.pb.h')
251
252class UnitTest(object):
253 '''Create a UnitTest'''
254
255 all = []
256 def __init__(self, target, *sources, **kwargs):
257 '''Specify the target name and any sources. Sources that are
258 not SourceFiles are evalued with Source(). All files are

--- 71 unchanged lines hidden (view full) ---

330 continue
331
332 if 'SConscript' in files:
333 build_dir = joinpath(env['BUILDDIR'], root[len(base_dir) + 1:])
334 SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)
335
336for extra_dir in extras_dir_list:
337 prefix_len = len(dirname(extra_dir)) + 1
251
252class UnitTest(object):
253 '''Create a UnitTest'''
254
255 all = []
256 def __init__(self, target, *sources, **kwargs):
257 '''Specify the target name and any sources. Sources that are
258 not SourceFiles are evalued with Source(). All files are

--- 71 unchanged lines hidden (view full) ---

330 continue
331
332 if 'SConscript' in files:
333 build_dir = joinpath(env['BUILDDIR'], root[len(base_dir) + 1:])
334 SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)
335
336for extra_dir in extras_dir_list:
337 prefix_len = len(dirname(extra_dir)) + 1
338
339 # Also add the corresponding build directory to pick up generated
340 # include files.
341 env.Append(CPPPATH=Dir(joinpath(env['BUILDDIR'], extra_dir[prefix_len:])))
342
338 for root, dirs, files in os.walk(extra_dir, topdown=True):
339 # if build lives in the extras directory, don't walk down it
340 if 'build' in dirs:
341 dirs.remove('build')
342
343 if 'SConscript' in files:
344 build_dir = joinpath(env['BUILDDIR'], root[prefix_len:])
345 SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)

--- 753 unchanged lines hidden ---
343 for root, dirs, files in os.walk(extra_dir, topdown=True):
344 # if build lives in the extras directory, don't walk down it
345 if 'build' in dirs:
346 dirs.remove('build')
347
348 if 'SConscript' in files:
349 build_dir = joinpath(env['BUILDDIR'], root[prefix_len:])
350 SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)

--- 753 unchanged lines hidden ---