C++11: Update AMBuildScript
This commit is contained in:
parent
1146bcad2c
commit
1977bf4d29
@ -136,6 +136,7 @@ class AMXXConfig(object):
|
||||
]
|
||||
cfg.cxxflags += [
|
||||
'-Wno-invalid-offsetof',
|
||||
'-std=c++11',
|
||||
]
|
||||
|
||||
cfg.linkflags += ['-m32']
|
||||
@ -143,11 +144,22 @@ class AMXXConfig(object):
|
||||
have_gcc = cxx.name == 'gcc'
|
||||
have_clang = cxx.name == 'clang'
|
||||
|
||||
if have_clang or (have_gcc and cxx.majorVersion >= 4):
|
||||
if have_clang or (have_gcc and cxx.version >= '4'):
|
||||
cfg.cflags += ['-fvisibility=hidden']
|
||||
cfg.cxxflags += ['-fvisibility-inlines-hidden']
|
||||
if (have_gcc and cxx.minorVersion >= 7) or (have_clang and cxx.majorVersion >= 3):
|
||||
if have_clang or (have_gcc and cxx.version >= '4.6'):
|
||||
cfg.cflags += ['-Wno-narrowing']
|
||||
if (have_gcc and cxx.version >= '4.7') or (have_clang and cxx.version >= '3'):
|
||||
cfg.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
||||
if have_gcc and cxx.version >= '4.8':
|
||||
cfg.cflags += ['-Wno-unused-result']
|
||||
if have_clang:
|
||||
cfg.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
|
||||
if cxx.version >= 'apple-clang-5.1' or cxx.version >= 'clang-3.4':
|
||||
cfg.cxxflags += ['-Wno-deprecated-register']
|
||||
else:
|
||||
cfg.cxxflags += ['-Wno-deprecated']
|
||||
cfg.cflags += ['-Wno-sometimes-uninitialized']
|
||||
|
||||
if have_gcc:
|
||||
cfg.cflags += ['-Wno-parentheses']
|
||||
|
@ -13,10 +13,10 @@ if AMXX.mysql_path:
|
||||
binary.compiler.defines += [
|
||||
'SM_DEFAULT_THREADER',
|
||||
'HAVE_STDINT_H',
|
||||
'stricmp=strcasecmp',
|
||||
]
|
||||
|
||||
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
||||
binary.compiler.defines += ['stricmp=strcasecmp']
|
||||
binary.compiler.linkflags += [
|
||||
os.path.join(AMXX.mysql_path, 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
|
@ -9,11 +9,11 @@ binary.compiler.cxxincludes += [
|
||||
]
|
||||
binary.compiler.defines += [
|
||||
'SM_DEFAULT_THREADER',
|
||||
'stricmp=strcasecmp',
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.defines += ['stricmp=strcasecmp']
|
||||
binary.compiler.postlink += ['-lpthread']
|
||||
|
||||
binary.sources += [
|
||||
|
Loading…
Reference in New Issue
Block a user