summaryrefslogtreecommitdiff
path: root/libnm/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-05-30 15:16:01 +0200
committerThomas Haller <thaller@redhat.com>2018-05-31 15:59:38 +0200
commitf445128af4255cc1c195530bd888f2024a4f71f3 (patch)
treeebb49b490d1f7003df8b757935a8ed92596777b0 /libnm/tests
parentb8b6100c78a039c9ae02013860b1e1a93ac1783a (diff)
downloadNetworkManager-f445128af4255cc1c195530bd888f2024a4f71f3.tar.gz
build/meson: fix meson build for shared files
The files in shared/nm-utils are not compiled as one static library, instead each subproject that needs (parts of) them, re-compiles the files individually. The major reason for that is, because we might have different compile flags, depending on whether we build libnm-core or libnm-util/libnm-glib. Actually, I think that is not really the case, and maybe this should be refactored, to indeed build them all as a static library first. Anyway, libnm-util, libnm-glib, clients' common lib, they all need a different set of shared files that they should compile. Refactor "shared/meson.build" to account for that and handle it like autotools does. Another change is, that "shared_c_siphash_dep" no longer advertises "include_directories: include_directories('c-siphash/src')". We don't put c-siphash.h into the include search path. Users who need it, should include it via "#include <c-siphash/src/c-siphash.h>". The only exception is when building shared_n_acd library, which is not under our control.
Diffstat (limited to 'libnm/tests')
-rw-r--r--libnm/tests/meson.build27
1 files changed, 14 insertions, 13 deletions
diff --git a/libnm/tests/meson.build b/libnm/tests/meson.build
index 54a1bf3289..e2b882733d 100644
--- a/libnm/tests/meson.build
+++ b/libnm/tests/meson.build
@@ -1,13 +1,8 @@
test_units = [
- ['test-general', shared_utils, [libnm_utils]],
- ['test-nm-client', shared_test_utils, []],
- ['test-remote-settings-client', shared_test_utils, []],
- ['test-secret-agent', shared_test_utils, []]
-]
-
-deps = [
- libnm_dep,
- nm_core_dep
+ ['test-general', [libnm_utils, libnm_core]],
+ ['test-nm-client', []],
+ ['test-remote-settings-client', []],
+ ['test-secret-agent', []],
]
cflags = [
@@ -18,10 +13,16 @@ cflags = [
foreach test_unit: test_units
exe = executable(
'libnm-' + test_unit[0],
- [test_unit[0] + '.c'] + test_unit[1],
- dependencies: deps,
+ [
+ test_unit[0] + '.c',
+ shared_nm_test_utils_impl_c,
+ ],
+ dependencies: [
+ libnm_dep,
+ nm_core_dep,
+ ],
c_args: cflags,
- link_with: test_unit[2]
+ link_with: test_unit[1]
)
test(
@@ -34,7 +35,7 @@ endforeach
# just test, that we can build "nm-vpn-plugin-utils.c"
libnm_vpn_plugin_utils_test = static_library(
'nm-vpn-plugin-utils-test',
- sources: shared_vpn_plugin_utils + [libnm_enum[1]],
+ sources: shared_nm_utils_nm_vpn_plugin_utils_c + [libnm_enum[1]],
include_directories: libnm_inc,
dependencies: nm_core_dep,
c_args: cflags