The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
8 years ago
|
project('simd', 'c')
|
||
|
|
||
8 years ago
|
simd = import('unstable-simd')
|
||
8 years ago
|
|
||
8 years ago
|
cc = meson.get_compiler('c')
|
||
|
|
||
8 years ago
|
cdata = configuration_data()
|
||
|
|
||
8 years ago
|
if not meson.is_cross_build() and host_machine.cpu_family() == 'arm' and cc.get_id() == 'clang'
|
||
|
message('Adding -march=armv7 because assuming that this build happens on Raspbian.')
|
||
|
message('Its Clang seems to be misconfigured and does not support NEON by default.')
|
||
|
add_project_arguments('-march=armv7', language : 'c')
|
||
|
endif
|
||
|
|
||
8 years ago
|
if cc.get_id() == 'msvc' and cc.version().version_compare('<17')
|
||
8 years ago
|
error('MESON_SKIP_TEST VS2010 produces broken binaries on x86.')
|
||
|
endif
|
||
|
|
||
8 years ago
|
# FIXME add [a, b] = function()
|
||
|
rval = simd.check('mysimds',
|
||
8 years ago
|
mmx : 'simd_mmx.c',
|
||
|
sse : 'simd_sse.c',
|
||
|
sse2 : 'simd_sse2.c',
|
||
|
sse3 : 'simd_sse3.c',
|
||
|
ssse3 : 'simd_ssse3.c',
|
||
|
sse41 : 'simd_sse41.c',
|
||
|
sse42 : 'simd_sse42.c',
|
||
|
avx : 'simd_avx.c',
|
||
|
avx2 : 'simd_avx2.c',
|
||
|
neon : 'simd_neon.c',
|
||
7 years ago
|
compiler : cc,
|
||
|
include_directories : include_directories('include'))
|
||
8 years ago
|
|
||
8 years ago
|
simdlibs = rval[0]
|
||
8 years ago
|
cdata.merge_from(rval[1])
|
||
8 years ago
|
|
||
8 years ago
|
configure_file(output : 'simdconfig.h',
|
||
|
configuration : cdata)
|
||
|
|
||
8 years ago
|
p = executable('simdtest', 'simdchecker.c', 'fallback.c',
|
||
|
link_with : simdlibs)
|
||
8 years ago
|
|
||
|
test('simdtest', p)
|
||
|
|