From 4b016e26a626126c8ed209d801a6ac27baaa6777 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 11 Aug 2025 18:13:36 -0400 Subject: Revert "build: Throw an error instead of warning for sourceless targets" This reverts commit 651aede977179c5fe382744e3dd91ca8e01d050c. This was most certainly not acceptable. --- test cases/common/44 pkgconfig-gen/meson.build | 2 +- test cases/common/44 pkgconfig-gen/simple7.c | 0 test cases/failing/136 target with no sources/meson.build | 3 --- test cases/failing/136 target with no sources/test.json | 7 ------- test cases/warning/8 target with no sources/meson.build | 3 +++ test cases/warning/8 target with no sources/test.json | 7 +++++++ 6 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 test cases/common/44 pkgconfig-gen/simple7.c delete mode 100644 test cases/failing/136 target with no sources/meson.build delete mode 100644 test cases/failing/136 target with no sources/test.json create mode 100644 test cases/warning/8 target with no sources/meson.build create mode 100644 test cases/warning/8 target with no sources/test.json (limited to 'test cases') diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build index 624126cb1..fd6371ef4 100644 --- a/test cases/common/44 pkgconfig-gen/meson.build +++ b/test cases/common/44 pkgconfig-gen/meson.build @@ -189,7 +189,7 @@ endtestcase # Make sure the -uninstalled.pc file contains both include directories. # See dependencies/test2.c that gets built against both simple7.pc and # simple7-uninstalled.pc. -simple7 = library('simple7', 'simple7.c', include_directories: 'inc1') +simple7 = library('simple7', include_directories: 'inc1') dep = declare_dependency(include_directories: 'inc2') install_headers('inc1/inc1.h', 'inc2/inc2.h') pkgg.generate(simple7, libraries: dep) diff --git a/test cases/common/44 pkgconfig-gen/simple7.c b/test cases/common/44 pkgconfig-gen/simple7.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/136 target with no sources/meson.build b/test cases/failing/136 target with no sources/meson.build deleted file mode 100644 index 2a8ee110b..000000000 --- a/test cases/failing/136 target with no sources/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('no sources', 'c') - -static_library('no sources') diff --git a/test cases/failing/136 target with no sources/test.json b/test cases/failing/136 target with no sources/test.json deleted file mode 100644 index 9cef75524..000000000 --- a/test cases/failing/136 target with no sources/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/136 target with no sources/meson.build:3:0: ERROR: Build target no sources has no sources." - } - ] -} diff --git a/test cases/warning/8 target with no sources/meson.build b/test cases/warning/8 target with no sources/meson.build new file mode 100644 index 000000000..2a8ee110b --- /dev/null +++ b/test cases/warning/8 target with no sources/meson.build @@ -0,0 +1,3 @@ +project('no sources', 'c') + +static_library('no sources') diff --git a/test cases/warning/8 target with no sources/test.json b/test cases/warning/8 target with no sources/test.json new file mode 100644 index 000000000..30e5b05f1 --- /dev/null +++ b/test cases/warning/8 target with no sources/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "WARNING: Build target no sources has no sources. This was never supposed to be allowed but did because of a bug, support will be removed in a future release of Meson" + } + ] +} -- cgit v1.2.3