16 """@file build.py Linux example build script.
18 Builds a tiny example using cmake.
20 Run 'build.py --help' for options.
26 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
28 import buildutil.common
29 import buildutil.linux
33 parser = argparse.ArgumentParser()
34 buildutil.linux.BuildEnvironment.add_arguments(parser)
35 args = parser.parse_args()
39 env = buildutil.linux.BuildEnvironment(args)
42 env.cmake_flags =
'-DMESSAGE="Hello, World!"'
48 env.make_archive([
'Hello'],
'output.zip')
52 except buildutil.common.Error
as e:
53 print >> sys.stderr,
'Caught buildutil error: %s' % e.error_message
57 print >> sys.stderr,
'Caught IOError for file %s: %s' % (e.filename,
63 if __name__ ==
'__main__':