Tolerate custom target sources which can't be converted to Files

For backwards compatibility, tolerate but warn about custom target sources
which can't be converted to Files
pull/3061/head
Jon Turney 6 years ago
parent 0a1468f8f3
commit e702d754b1
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 4
      mesonbuild/interpreter.py

@ -3232,7 +3232,11 @@ root and issuing %s.
name = args[0]
kwargs['install_mode'] = self._get_kwarg_install_mode(kwargs)
if 'input' in kwargs:
try:
kwargs['input'] = self.source_strings_to_files(extract_as_list(kwargs, 'input'))
except mesonlib.MesonException:
mlog.warning('''Custom target input \'%s\' can\'t be converted to File object(s).
This will become a hard error in the future.''' % kwargs['input'])
tg = CustomTargetHolder(build.CustomTarget(name, self.subdir, self.subproject, kwargs), self)
self.add_target(name, tg.held_object)
return tg

Loading…
Cancel
Save