diff options
author | Volker Weißmann <volker.weissmann@gmx.de> | 2022-06-29 18:38:02 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2022-07-18 13:46:26 +0200 |
commit | cdd2dca17491dddafbed1225b2d6471f4eab0535 (patch) | |
tree | fd7a9ba4cf54c99a00ba5b7b8fa9248cb2b46c90 /mesonbuild/cmake/traceparser.py | |
parent | 0bf66ff02c4e89cf3875206c2bf04851340255b4 (diff) | |
download | meson-cdd2dca17491dddafbed1225b2d6471f4eab0535.zip meson-cdd2dca17491dddafbed1225b2d6471f4eab0535.tar.gz meson-cdd2dca17491dddafbed1225b2d6471f4eab0535.tar.bz2 |
cmake module: Better warnings and error messages in some cases.
Diffstat (limited to 'mesonbuild/cmake/traceparser.py')
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 4dc09ff..e841c7a 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -231,7 +231,14 @@ class CMakeTraceParser: for ctgt in self.custom_targets: ctgt.outputs = pathlist_gen(ctgt._outputs_str) + temp = ctgt.command ctgt.command = [strlist_gen(x) for x in ctgt.command] + for command, src in zip(ctgt.command, temp): + if command[0] == "": + raise CMakeException( + "We have a problem: We would like to generate a recipe for a target that should be generated by the custom command %s\nThe problem is that the executable that should be called, here: '%s', is a variable that evaluates to an empty string. An empty string is not a valid path to an executable so ninja will not be able to call it." + % (repr(src), src[0]) + ) ctgt.working_dir = Path(parse_generator_expressions(str(ctgt.working_dir), self)) if ctgt.working_dir is not None else None # Postprocess |