diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-23 22:48:48 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-23 22:48:48 +0200 |
commit | 4ada43585c11eabd6aa94dcd7ab6d62952796a26 (patch) | |
tree | 407e98030faced997c7cb67b525058084ab9f9ad /SConstruct | |
parent | 12f709042181115db56bf7fc6e234aaaed751b9d (diff) |
Added a profiling-option to SConstruct to compile and link with -pg.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ env = Environment( engine = Glob('engine/*.cpp') AddOption('--release', action = 'store_true') +AddOption('--profiling', action = 'store_true') if env['PLATFORM'] == 'darwin': env.Append(CPPFLAGS = '') @@ -24,6 +25,10 @@ else: if not GetOption('release'): env.Append(CPPFLAGS = ['-Wall', '-g']) +if GetOption('profiling'): + env.Append(CPPFLAGS = ['-pg']) + env.Append(LINKFLAGS = ['-pg']) + env.Program('foo', ['main.cpp'] + engine) # vim: syn=python |