]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: link test-lib{systemd,udev}-sym in the usual way
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 10 Apr 2017 21:35:55 +0000 (17:35 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:27 +0000 (21:47 -0400)
I tried to link to the right library by hand, because without
mesonbuid/meson#1545, libbasic.a is added to the link arguments. We want to
link the test with nothing but the library being tested. Doing the linking by
hand did achieve that, but it caused a bigger issue: meson didn't know about
the dependency on the library. And the dependency cannot be added using
link_depends, because "link_depends arguments must be strings...", and this
does not work with a compilation target. So just link in the usual way and
accept the overlinking (for now).

meson.build

index 3f53b8a7e2fdd5c561e45fab108d05d6939f83e0..9d253590e35bc5ef9280fdeb24b02dff00cb7812 100644 (file)
@@ -2000,11 +2000,7 @@ test_libsystemd_sym = executable(
   'test-libsystemd-sym',
   test_libsystemd_sym_c,
   include_directories : includes,
-  # link_with : [libsystemd],
-  # TODO: try again with https://github.com/mesonbuild/meson/pull/1545
-  link_args : ['libsystemd.so.0.18.0'],
-  # link_depends : [libsystemd],
-  # TODO: try again after "Link_depends arguments must be strings." is solved
+  link_with : [libsystemd],
   install : install_tests,
   install_dir : testsdir)
 test('test-libsystemd-sym',
@@ -2015,7 +2011,7 @@ test_libudev_sym = executable(
   test_libudev_sym_c,
   include_directories : includes,
   c_args : ['-Wno-deprecated-declarations'],
-  link_args : ['src/libudev/libudev.so.1.6.6'],
+  link_with : [libudev],
   install : install_tests,
   install_dir : testsdir)
 test('test-libudev-sym',