Commit 7f293cc7d8a79e7fbe6ec2f6f28bf0b1407229e1
- Diff rendering mode:
- inline
- side by side
SConstruct
(17 / 10)
|   | |||
| 11 | 11 | env.Append(LIBPATH = ['/opt/local/lib', '/usr/local/lib']) | |
| 12 | 12 | ||
| 13 | 13 | if ARGUMENTS.get('USE_ASSERT', 0): | |
| 14 | env.Append(CCFLAGS = '-DUSE_ASSERT=1') | ||
| 14 | env.Append(CCFLAGS = '-DUSE_ASSERT=1') | ||
| 15 | 15 | ||
| 16 | 16 | env.Append(CCFLAGS = '-g -Wall -Werror') | |
| 17 | 17 | env.Append(LINKFLAGS = '-g') | |
| 18 | 18 | ||
| 19 | 19 | if ARGUMENTS.get('PROFILE', 0): | |
| 20 | env.Append(CCFLAGS = '-pg') | ||
| 21 | env.Append(LINKFLAGS = '-pg') | ||
| 20 | env.Append(CCFLAGS = '-pg') | ||
| 21 | env.Append(LINKFLAGS = '-pg') | ||
| 22 | 22 | else: | |
| 23 | # Turn on tons of optimization if we're not profiling. | ||
| 24 | env.Append(CCFLAGS = '-O3') | ||
| 23 | # Turn on tons of optimization if we're not profiling. | ||
| 24 | env.Append(CCFLAGS = '-O3') | ||
| 25 | 25 | ||
| 26 | 26 | env.conf = Configure(env) | |
| 27 | 27 | ||
| 28 | build_libs=['z'] | ||
| 29 | |||
| 28 | 30 | if not env.conf.CheckLibWithHeader('boost_regex', | |
| 29 | 'boost/regex.hpp', 'c++'): | ||
| 30 | print 'Boost regex is required' | ||
| 31 | Exit(1) | ||
| 31 | 'boost/regex.hpp', 'c++'): | ||
| 32 | if not env.conf.CheckLibWithHeader('boost_regex-mt', | ||
| 33 | 'boost/regex.hpp', 'c++'): | ||
| 34 | print 'Boost regex is required' | ||
| 35 | Exit(1) | ||
| 36 | else: | ||
| 37 | build_libs.append('boost_regex-mt') | ||
| 38 | else: | ||
| 39 | build_libs.append('boost_regex') | ||
| 32 | 40 | ||
| 33 | 41 | env = env.conf.Finish() | |
| 34 | env.Program('logmerge', ['logmerge.cpp', 'logfiles.cpp'], | ||
| 35 | LIBS=['z', 'boost_regex']) | ||
| 42 | env.Program('logmerge', ['logmerge.cpp', 'logfiles.cpp'], LIBS=build_libs) | ||
| 36 | 43 | ||
| 37 | 44 | # vim: syntax=python |

