aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter/interpreter.py10
-rw-r--r--test cases/common/14 configure file/meson.build2
2 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 2eb7a0a..fcf6614 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2184,10 +2184,12 @@ This will become a hard error in the future.''', location=self.current_node)
"present in the given configuration data.", location=node)
if confdata_useless:
ifbase = os.path.basename(inputs_abs[0])
- mlog.warning('Got an empty configuration_data() object and found no '
- f'substitutions in the input file {ifbase!r}. If you want to '
- 'copy a file to the build dir, use the \'copy:\' keyword '
- 'argument added in 0.47.0', location=node)
+ tv = FeatureNew.get_target_version(self.subproject)
+ if FeatureNew.check_version(tv, '0.47.0'):
+ mlog.warning('Got an empty configuration_data() object and found no '
+ f'substitutions in the input file {ifbase!r}. If you want to '
+ 'copy a file to the build dir, use the \'copy:\' keyword '
+ 'argument added in 0.47.0', location=node)
else:
mesonlib.dump_conf_header(ofile_abs, conf.conf_data, output_format)
conf.mark_used()
diff --git a/test cases/common/14 configure file/meson.build b/test cases/common/14 configure file/meson.build
index 8fdca21..416dad7 100644
--- a/test cases/common/14 configure file/meson.build
+++ b/test cases/common/14 configure file/meson.build
@@ -1,4 +1,4 @@
-project('configure file test', 'c')
+project('configure file test', 'c', meson_version: '>=0.47.0')
conf = configuration_data()