forked from JeffersonLab/hcana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
darwin64.py
42 lines (29 loc) · 998 Bytes
/
darwin64.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import platform
import os
def config(env,args):
debug = args.get('debug',0)
standalone = args.get('standalone',0)
cppcheck = args.get('cppcheck',0)
checkheaders = args.get('checkheaders',0)
if int(debug):
env.Append(CXXFLAGS = '-g -O0')
else:
env.Append(CXXFLAGS = '-O')
env.Append(CPPDEFINES= '-DNDEBUG')
if int(standalone):
env.Append(STANDALONE= '1')
if int(cppcheck):
env.Append(CPPCHECK= '1')
if int(checkheaders):
env.Append(CHECKHEADERS= '1')
#env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual -pthread -rdynamic')
env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual -pthread')
env.Append(CPPDEFINES = '-DMACVERS')
cxxversion = env.subst('$CXXVERSION')
# if float(cxxversion[0:2])>=4.0:
# env.Append(CXXFLAGS = '-Wextra -Wno-missing-field-initializers')
if float(cxxversion[0:2])>=3.0:
env.Append(CPPDEFINES = '-DHAS_SSTREAM')
env['SHLINKFLAGS'] = '$LINKFLAGS -shared -Wl,-undefined,dynamic_lookup'
env['SHLIBSUFFIX'] = '.so'
#end darwin64.py