mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 20:35:31 +00:00
build: Avoid building files multiple times
We don't have to build each source for every test, instead we could create a static library link it with every test, which will be a lot faster.
This commit is contained in:
parent
1db1ba6ca9
commit
b1278f6140
6 changed files with 20 additions and 12 deletions
|
@ -51,6 +51,7 @@ calls_dummy = shared_module(
|
||||||
dummy_sources,
|
dummy_sources,
|
||||||
dependencies: dummy_deps,
|
dependencies: dummy_deps,
|
||||||
include_directories: src_include,
|
include_directories: src_include,
|
||||||
|
link_with: libcalls,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: dummy_install_dir
|
install_dir: dummy_install_dir
|
||||||
)
|
)
|
||||||
|
|
|
@ -51,6 +51,7 @@ calls_mm = shared_module(
|
||||||
mm_sources,
|
mm_sources,
|
||||||
dependencies: mm_deps,
|
dependencies: mm_deps,
|
||||||
include_directories: src_include,
|
include_directories: src_include,
|
||||||
|
link_with: libcalls,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: mm_install_dir
|
install_dir: mm_install_dir
|
||||||
)
|
)
|
||||||
|
|
|
@ -54,7 +54,7 @@ calls_ofono = shared_module(
|
||||||
src_include,
|
src_include,
|
||||||
include_directories('.')
|
include_directories('.')
|
||||||
],
|
],
|
||||||
link_with: gdbofono_lib,
|
link_with: [gdbofono_lib, libcalls],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: ofono_install_dir
|
install_dir: ofono_install_dir
|
||||||
)
|
)
|
||||||
|
|
|
@ -69,6 +69,7 @@ calls_sip = shared_module(
|
||||||
sip_sources,
|
sip_sources,
|
||||||
dependencies: sip_deps,
|
dependencies: sip_deps,
|
||||||
include_directories: src_include,
|
include_directories: src_include,
|
||||||
|
link_with: libcalls,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: sip_install_dir
|
install_dir: sip_install_dir
|
||||||
)
|
)
|
||||||
|
|
|
@ -131,13 +131,22 @@ version_h = vcs_tag(
|
||||||
|
|
||||||
calls_sources += [ version_h ]
|
calls_sources += [ version_h ]
|
||||||
|
|
||||||
|
libcalls = static_library(
|
||||||
|
'calls', calls_sources,
|
||||||
|
install: false,
|
||||||
|
dependencies : calls_deps,
|
||||||
|
link_with: calls_vala,
|
||||||
|
include_directories: src_include,
|
||||||
|
)
|
||||||
|
|
||||||
executable (
|
executable (
|
||||||
'gnome-calls',
|
'gnome-calls',
|
||||||
calls_sources, 'main.c',
|
calls_resources,
|
||||||
|
'main.c',
|
||||||
dependencies : calls_deps,
|
dependencies : calls_deps,
|
||||||
export_dynamic : true,
|
export_dynamic : true,
|
||||||
include_directories : calls_includes,
|
include_directories : calls_includes,
|
||||||
install : true,
|
install : true,
|
||||||
link_with : calls_vala,
|
link_with : [calls_vala, libcalls],
|
||||||
c_args : '-Wno-error=deprecated-declarations',
|
c_args : '-Wno-error=deprecated-declarations',
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,11 +45,10 @@ foreach test : tests
|
||||||
'common.h' ]
|
'common.h' ]
|
||||||
|
|
||||||
t = executable(name, test_sources,
|
t = executable(name, test_sources,
|
||||||
calls_sources,
|
|
||||||
dummy_sources,
|
dummy_sources,
|
||||||
c_args : test_cflags,
|
c_args : test_cflags,
|
||||||
link_args: test_link_args,
|
link_args: test_link_args,
|
||||||
link_with : calls_vala,
|
link_with : [calls_vala, libcalls],
|
||||||
dependencies: calls_deps,
|
dependencies: calls_deps,
|
||||||
include_directories : [
|
include_directories : [
|
||||||
calls_includes,
|
calls_includes,
|
||||||
|
@ -62,10 +61,9 @@ endforeach
|
||||||
test_sources = [ 'test-manager.c' ]
|
test_sources = [ 'test-manager.c' ]
|
||||||
|
|
||||||
t = executable('manager', test_sources,
|
t = executable('manager', test_sources,
|
||||||
calls_sources,
|
|
||||||
c_args : test_cflags,
|
c_args : test_cflags,
|
||||||
link_args: test_link_args,
|
link_args: test_link_args,
|
||||||
link_with : calls_vala,
|
link_with : [calls_vala, libcalls],
|
||||||
dependencies: calls_deps,
|
dependencies: calls_deps,
|
||||||
include_directories : [
|
include_directories : [
|
||||||
calls_includes
|
calls_includes
|
||||||
|
@ -79,7 +77,7 @@ t = executable('plugins', test_sources,
|
||||||
calls_sources,
|
calls_sources,
|
||||||
c_args : test_cflags,
|
c_args : test_cflags,
|
||||||
link_args: test_link_args,
|
link_args: test_link_args,
|
||||||
link_with : calls_vala,
|
link_with : [calls_vala, libcalls],
|
||||||
dependencies: calls_deps,
|
dependencies: calls_deps,
|
||||||
include_directories : [
|
include_directories : [
|
||||||
calls_includes
|
calls_includes
|
||||||
|
@ -89,10 +87,9 @@ test('plugins', t, env: test_env)
|
||||||
|
|
||||||
test_sources = [ 'test-sip.c' ]
|
test_sources = [ 'test-sip.c' ]
|
||||||
t = executable('sip', test_sources,
|
t = executable('sip', test_sources,
|
||||||
calls_sources,
|
|
||||||
c_args : test_cflags,
|
c_args : test_cflags,
|
||||||
link_args: test_link_args,
|
link_args: test_link_args,
|
||||||
link_with : [calls_vala, calls_sip],
|
link_with : [calls_vala, calls_sip, libcalls],
|
||||||
dependencies: [calls_deps, sip_deps],
|
dependencies: [calls_deps, sip_deps],
|
||||||
include_directories : [
|
include_directories : [
|
||||||
calls_includes,
|
calls_includes,
|
||||||
|
@ -103,10 +100,9 @@ test('sip', t, env: test_env)
|
||||||
|
|
||||||
test_sources = [ 'test-account.c' ]
|
test_sources = [ 'test-account.c' ]
|
||||||
t = executable('account', test_sources,
|
t = executable('account', test_sources,
|
||||||
calls_sources,
|
|
||||||
c_args : test_cflags,
|
c_args : test_cflags,
|
||||||
link_args: test_link_args,
|
link_args: test_link_args,
|
||||||
link_with : [calls_vala, calls_sip],
|
link_with : [calls_vala, calls_sip, libcalls],
|
||||||
dependencies: [calls_deps, sip_deps],
|
dependencies: [calls_deps, sip_deps],
|
||||||
include_directories : [
|
include_directories : [
|
||||||
calls_includes,
|
calls_includes,
|
||||||
|
|
Loading…
Reference in a new issue