From 4ada43585c11eabd6aa94dcd7ab6d62952796a26 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 23 May 2010 22:48:48 +0200 Subject: Added a profiling-option to SConstruct to compile and link with -pg. --- SConstruct | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 1e7e66e..1a49017 100644 --- a/SConstruct +++ b/SConstruct @@ -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 -- cgit v1.2.3