diff options
author | Emanuel Schmidt <eschmidt216@gmail.com> | 2023-02-01 19:31:13 +0100 |
---|---|---|
committer | Emanuel Schmidt <eschmidt216@gmail.com> | 2023-02-08 20:56:05 +0100 |
commit | eb998d7b6510b04f02259856c135a4083f8e6184 (patch) | |
tree | 231ec9ecefc23bbc6cd99acd1797118fd97d308e /test | |
parent | 713077d0a3c310ca1955bc331d46d55d0ae4a72b (diff) |
Separate meson build options for demos and tests
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.sources | 8 | ||||
-rw-r--r-- | test/meson.build | 13 | ||||
-rw-r--r-- | test/utils/meson.build | 31 | ||||
-rw-r--r-- | test/utils/utils-prng.c (renamed from test/utils-prng.c) | 0 | ||||
-rw-r--r-- | test/utils/utils-prng.h (renamed from test/utils-prng.h) | 0 | ||||
-rw-r--r-- | test/utils/utils.c (renamed from test/utils.c) | 0 | ||||
-rw-r--r-- | test/utils/utils.h (renamed from test/utils.h) | 0 |
8 files changed, 40 insertions, 15 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 6dbed88..6b0e753 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/test/Makefile.sources AM_CFLAGS = $(OPENMP_CFLAGS) $(PTHREAD_CFLAGS) AM_LDFLAGS = $(OPENMP_CFLAGS) $(TESTPROGS_EXTRA_LDFLAGS) $(PTHREAD_LDFLAGS) LDADD = libutils.la $(top_builddir)/pixman/libpixman-1.la -lm $(PNG_LIBS) $(PTHREAD_LIBS) -AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(PNG_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_srcdir)/test/utils -I$(top_builddir)/pixman $(PNG_CFLAGS) libutils_la_SOURCES = $(libutils_sources) $(libutils_headers) @@ -14,4 +14,5 @@ TESTS = $(TESTPROGRAMS) EXTRA_DIST = \ meson.build \ + utils/meson.build \ $(NULL) diff --git a/test/Makefile.sources b/test/Makefile.sources index 0a56231..c9c6c4d 100644 --- a/test/Makefile.sources +++ b/test/Makefile.sources @@ -46,11 +46,11 @@ OTHERPROGRAMS = \ # Utility functions libutils_sources = \ - utils.c \ - utils-prng.c \ + utils/utils.c \ + utils/utils-prng.c \ $(NULL) libutils_headers = \ - utils.h \ - utils-prng.h \ + utils/utils.h \ + utils/utils-prng.h \ $(NULL) diff --git a/test/meson.build b/test/meson.build index 59a0d42..47dd33c 100644 --- a/test/meson.build +++ b/test/meson.build @@ -67,20 +67,13 @@ progs = [ 'affine-bench', ] -libtestutils = static_library( - 'testutils', - ['utils.c', 'utils-prng.c', config_h], - dependencies : [dep_openmp, dep_m, dep_png, idep_pixman], -) - foreach t : tests test( t, executable( t, [t + '.c', config_h], - link_with : libtestutils, - dependencies : [dep_threads, dep_openmp, idep_pixman], + dependencies : [idep_pixman, libtestutils_dep, dep_threads, dep_openmp, dep_png], ), timeout : 120, is_parallel : true, @@ -91,7 +84,7 @@ foreach p : progs executable( p, p + '.c', - link_with : libtestutils, - dependencies : [dep_openmp, idep_pixman], + dependencies : [idep_pixman, libtestutils_dep, dep_openmp], ) endforeach + diff --git a/test/utils/meson.build b/test/utils/meson.build new file mode 100644 index 0000000..9a6e820 --- /dev/null +++ b/test/utils/meson.build @@ -0,0 +1,31 @@ +# Copyright © 2018 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +libtestutils = static_library( + 'testutils', + ['utils.c', 'utils-prng.c', config_h], + dependencies : [idep_pixman, dep_openmp, dep_m, dep_png], +) + +libtestutils_dep = declare_dependency( + link_with: libtestutils, + include_directories: include_directories('.'), +) + diff --git a/test/utils-prng.c b/test/utils/utils-prng.c index 0cf53dd..0cf53dd 100644 --- a/test/utils-prng.c +++ b/test/utils/utils-prng.c diff --git a/test/utils-prng.h b/test/utils/utils-prng.h index f9ae8dd..f9ae8dd 100644 --- a/test/utils-prng.h +++ b/test/utils/utils-prng.h diff --git a/test/utils.c b/test/utils/utils.c index 23bf019..23bf019 100644 --- a/test/utils.c +++ b/test/utils/utils.c diff --git a/test/utils.h b/test/utils/utils.h index 701417f..701417f 100644 --- a/test/utils.h +++ b/test/utils/utils.h |