Browse Source

Added --profile option to config

v1.x
Tj Holowaychuk 14 years ago
parent
commit
39b507fff7
  1. 11
      wscript

11
wscript

@ -1,4 +1,6 @@
import glob
import Options
srcdir = '.'
blddir = 'build'
@ -6,13 +8,22 @@ VERSION = '0.0.1'
def set_options(opt):
opt.tool_options('compiler_cxx')
opt.add_option('--profile', action='store_true', help='Enable profiling', dest='profile', default=False)
def configure(conf):
o = Options.options
conf.env['USE_PROFILING'] = o.profile
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
conf.env.append_value('CPPFLAGS', '-DNDEBUG')
if conf.check(lib='jpeg', uselib_store='JPEG', mandatory=False):
conf.env.append_value('CPPFLAGS', '-DHAVE_JPEG=1')
if conf.env['USE_PROFILING'] == True:
conf.env.append_value('CXXFLAGS', ['-pg'])
conf.env.append_value('LINKFLAGS', ['-pg'])
conf.check_cfg(package='cairo', args='--cflags --libs', mandatory=True)
flags = ['-O3', '-Wall']
conf.env.append_value('CCFLAGS', flags)

Loading…
Cancel
Save