2015-09-25 03:58:00 +02:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os
|
|
|
|
|
2020-08-19 22:34:12 +02:00
|
|
|
for cxx in MMS.all_targets:
|
2017-12-20 08:11:57 +01:00
|
|
|
name = 'test_sourcehook'
|
2020-08-19 22:34:12 +02:00
|
|
|
binary = MMS.Program(cxx, name)
|
2017-12-20 08:11:57 +01:00
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(builder.sourcePath, 'core', 'sourcehook'),
|
|
|
|
]
|
2018-07-31 20:02:13 +02:00
|
|
|
if binary.compiler.version >= 'gcc-4.9':
|
|
|
|
binary.compiler.cxxflags += ['-fno-devirtualize']
|
2017-12-20 08:11:57 +01:00
|
|
|
if binary.compiler.version >= 'clang-2.9' or binary.compiler.version >= 'apple-clang-3.0':
|
|
|
|
binary.compiler.cxxflags += ['-Wno-null-dereference']
|
2015-09-25 03:58:00 +02:00
|
|
|
|
2017-12-20 08:11:57 +01:00
|
|
|
binary.sources += [
|
|
|
|
'main.cpp',
|
|
|
|
'../sourcehook.cpp',
|
|
|
|
'../sourcehook_impl_chookmaninfo.cpp',
|
|
|
|
'../sourcehook_impl_chookidman.cpp',
|
|
|
|
'../sourcehook_impl_cproto.cpp',
|
|
|
|
'../sourcehook_impl_cvfnptr.cpp',
|
|
|
|
'test1.cpp',
|
|
|
|
'test2.cpp',
|
|
|
|
'test3.cpp',
|
|
|
|
'test4.cpp',
|
|
|
|
'testbail.cpp',
|
|
|
|
'testbail2.cpp',
|
|
|
|
'testhookmangen.cpp',
|
|
|
|
'testlist.cpp',
|
|
|
|
'testmanual.cpp',
|
|
|
|
'testmulti.cpp',
|
|
|
|
'testoddthunks.cpp',
|
|
|
|
'testrecall.cpp',
|
|
|
|
'testreentr.cpp',
|
|
|
|
'testref.cpp',
|
|
|
|
'testrefret.cpp',
|
|
|
|
'testvphooks.cpp',
|
|
|
|
]
|
2020-08-19 22:34:12 +02:00
|
|
|
if binary.compiler.target.arch == 'x86':
|
2017-12-20 08:11:57 +01:00
|
|
|
binary.sources += ['../sourcehook_hookmangen.cpp']
|
2015-09-25 03:58:00 +02:00
|
|
|
|
2017-12-20 08:11:57 +01:00
|
|
|
builder.Add(binary)
|