diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-09 13:08:01 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2022-08-17 13:44:08 -0700 |
| commit | 6d50fadde5bc0654bfe4fbd0cc911ec30b0ea47a (patch) | |
| tree | 7d76b050895d2f4692bd14431f003726d4070969 /test cases/common | |
| parent | 429e7c1edc7ef76b728b624dbd3b68834c253117 (diff) | |
| download | meson-6d50fadde5bc0654bfe4fbd0cc911ec30b0ea47a.tar.gz | |
tests: fix targets with no sources
This was never supposed to be possible, so stop doing it.
Diffstat (limited to 'test cases/common')
5 files changed, 7 insertions, 3 deletions
diff --git a/test cases/common/215 source set realistic example/dummy.cpp b/test cases/common/215 source set realistic example/dummy.cpp new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/215 source set realistic example/dummy.cpp diff --git a/test cases/common/215 source set realistic example/meson.build b/test cases/common/215 source set realistic example/meson.build index d986b991a..7707964c2 100644 --- a/test cases/common/215 source set realistic example/meson.build +++ b/test cases/common/215 source set realistic example/meson.build @@ -30,6 +30,7 @@ subdir('devices') if meson.is_unity() specific.add_all(common) common = ss.source_set() + common.add(files('dummy.cpp')) endif common_lib = static_library('common', common.all_sources(), diff --git a/test cases/common/44 pkgconfig-gen/dependencies/dummy.c b/test cases/common/44 pkgconfig-gen/dependencies/dummy.c new file mode 100644 index 000000000..ef7be5123 --- /dev/null +++ b/test cases/common/44 pkgconfig-gen/dependencies/dummy.c @@ -0,0 +1,3 @@ +int dummy(void) { + return 0; +} diff --git a/test cases/common/44 pkgconfig-gen/dependencies/meson.build b/test cases/common/44 pkgconfig-gen/dependencies/meson.build index fb4e6b47c..6e27ae8b6 100644 --- a/test cases/common/44 pkgconfig-gen/dependencies/meson.build +++ b/test cases/common/44 pkgconfig-gen/dependencies/meson.build @@ -5,7 +5,7 @@ pkgg = import('pkgconfig') # libmain internally use libinternal and expose libexpose in its API exposed_lib = shared_library('libexposed', 'exposed.c') internal_lib = shared_library('libinternal', 'internal.c') -main_lib = both_libraries('libmain', link_with : [exposed_lib, internal_lib]) +main_lib = both_libraries('libmain', 'dummy.c', link_with : [exposed_lib, internal_lib]) custom_lib = shared_library('custom', 'custom.c') pkgg.generate(exposed_lib) @@ -55,7 +55,7 @@ pkgg.generate( # Verify that if we promote internal_lib as public dependency, it comes after # the main library. -main_lib2 = both_libraries('libmain2', link_with : internal_lib) +main_lib2 = both_libraries('libmain2', 'dummy.c', link_with : internal_lib) pkgg.generate(main_lib2, libraries : internal_lib, filebase : 'pub-lib-order', diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build index 9f5991efa..5c4dcfa34 100644 --- a/test cases/common/44 pkgconfig-gen/meson.build +++ b/test cases/common/44 pkgconfig-gen/meson.build @@ -153,7 +153,7 @@ ct = custom_target('stat3', output: fs.name(outfile), command: [python, '-c', script], ) -simple6 = library('simple6', link_with: ct) +simple6 = library('simple6', 'dependencies/dummy.c', link_with: ct) pkgg.generate(simple6) # implicit variables |
