meson: Improve the shared utils test build file
A new variable has been created for the C compiler flags to avoid polluting the target creation call so the flags are encapsulated.
This commit is contained in:

committed by
Thomas Haller

parent
70a34c54fe
commit
de90fc0810
@@ -1,12 +1,14 @@
|
|||||||
test_unit = 'test-shared-general'
|
test_unit = 'test-shared-general'
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
||||||
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
c_args: [
|
c_args: c_flags,
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
|
||||||
],
|
|
||||||
dependencies: libnm_utils_base_dep,
|
dependencies: libnm_utils_base_dep,
|
||||||
link_with: libnm_systemd_logging_stub,
|
link_with: libnm_systemd_logging_stub,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user