Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2018-09-28 13:52:45 +0300
committerMarvin Scholz <epirat07@gmail.com>2018-09-28 19:17:42 +0300
commitafa5479f82a7b833eea2db81ee3ef59458e4700b (patch)
tree293ba8584d26d125e887773e802272bff331bc9e
parent190da6aedad3a43a9fedc88714c124d30d516ab1 (diff)
Build: Add checkasm test
-rw-r--r--meson.build19
-rw-r--r--tests/meson.build30
2 files changed, 44 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 693d1b3..c2d1f1b 100644
--- a/meson.build
+++ b/meson.build
@@ -173,9 +173,9 @@ cdata.set10('HAVE_ASM', is_asm_enabled)
# Generate config headers
#
if cdata.has('HAVE_GETOPT_H')
- dav1d_inc_dirs = include_directories(['include', 'include/dav1d'])
+ dav1d_inc_dirs = include_directories(['.', 'include', 'include/dav1d'])
else
- dav1d_inc_dirs = include_directories(['include', 'include/dav1d', 'include/compat'])
+ dav1d_inc_dirs = include_directories(['.', 'include', 'include/dav1d', 'include/compat'])
endif
config_h_target = configure_file(output: 'config.h', configuration: cdata)
@@ -269,7 +269,7 @@ if is_asm_enabled
depfile: '@BASENAME@.obj.ndep',
arguments: [
'-f', nasm_format,
- '-I', '@CURRENT_SOURCE_DIR@/',
+ '-I', '@SOURCE_DIR@/',
'-MQ', '@OUTPUT@', '-MF', '@DEPFILE@',
'@EXTRA_ARGS@',
'@INPUT@',
@@ -312,14 +312,21 @@ if host_machine.system() == 'windows'
#entrypoints_objs += rc_source
endif
-libdav1d = library('dav1d',
+libdav1d_private = static_library('dav1d_private',
libdav1d_sources, nasm_objs,
version: meson.project_version(),
objects: [bitdepth_objs, entrypoints_objs],
include_directories: dav1d_inc_dirs,
c_args: [stackalign_flag],
dependencies: thread_dependency,
- install: true
+ install: false,
+ build_by_default: false,
+)
+
+libdav1d = library('dav1d',
+ version: '0.0.1',
+ link_whole: libdav1d_private,
+ install: true,
)
install_subdir('include/dav1d/', install_dir: 'include')
@@ -349,6 +356,8 @@ dav1d = executable('dav1d',
install: true,
)
+subdir('tests')
+
#
# pkg-config boilerplate
#
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..b4310e2
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,30 @@
+if is_asm_enabled
+ checkasm_sources = files('checkasm/checkasm.c')
+
+ checkasm_tmpl_sources = files('checkasm/mc.c')
+
+ checkasm_bitdepth_objs = []
+ foreach bitdepth : dav1d_bitdepths
+ checkasm_bitdepth_lib = static_library(
+ 'checkasm_bitdepth_@0@'.format(bitdepth),
+ checkasm_tmpl_sources,
+ include_directories: dav1d_inc_dirs,
+ c_args: ['-DBITDEPTH=@0@'.format(bitdepth), stackalign_flag],
+ install: false,
+ build_by_default: false,
+ )
+ checkasm_bitdepth_objs += checkasm_bitdepth_lib.extract_all_objects()
+ endforeach
+
+ checkasm_nasm_objs = nasm_gen.process(files('checkasm/x86/checkasm.asm'))
+
+ checkasm = executable('checkasm', checkasm_sources, checkasm_nasm_objs,
+ objects: [checkasm_bitdepth_objs],
+ include_directories: dav1d_inc_dirs,
+ link_with: libdav1d_private,
+ c_args: [stackalign_flag, stackrealign_flag],
+ build_by_default: false,
+ )
+
+ test('checkasm test', checkasm)
+endif