forked from JeffersonLab/analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux64.py
50 lines (36 loc) · 1.11 KB
/
linux64.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
43
44
45
46
47
48
49
50
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)
srcdist = args.get('srcdist',0)
if int(debug):
env.Append(CXXFLAGS = '-g')
env.Append(CXXFLAGS = '-O0')
env.Append(CPPDEFINES= '-DWITH_DEBUG')
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')
if int(srcdist):
env.Append(SRCDIST= '1')
env.Append(CXXFLAGS = '-Wall')
env.Append(CXXFLAGS = '-Woverloaded-virtual')
env.Append(CPPDEFINES = '-DLINUXVERS')
cxxversion = env.subst('$CXXVERSION')
if float(cxxversion[0:2])>=4.0:
env.Append(CXXFLAGS = '-Wextra')
env.Append(CXXFLAGS = '-Wno-missing-field-initializers')
env.Append(CXXFLAGS = '-Wno-unused-parameter')
if float(cxxversion[0:2])>=3.0:
env.Append(CPPDEFINES = '-DHAS_SSTREAM')
env['SHLINKFLAGS'] = '$LINKFLAGS -shared'
env['SHLIBSUFFIX'] = '.so'
#end linux6432.py