aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2022-06-30 16:11:39 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2022-07-18 13:46:26 +0200
commit5f3c7125cc4f9dadd084dee3be5fd84458ae74c8 (patch)
tree211fe78353697ba856fe6fc30fdd255ebd687572
parentcdd2dca17491dddafbed1225b2d6471f4eab0535 (diff)
downloadmeson-5f3c7125cc4f9dadd084dee3be5fd84458ae74c8.zip
meson-5f3c7125cc4f9dadd084dee3be5fd84458ae74c8.tar.gz
meson-5f3c7125cc4f9dadd084dee3be5fd84458ae74c8.tar.bz2
Applied tristan957's suggestions
-rw-r--r--mesonbuild/cmake/generator.py2
-rw-r--r--mesonbuild/cmake/traceparser.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/cmake/generator.py b/mesonbuild/cmake/generator.py
index f274bce..a4224cc 100644
--- a/mesonbuild/cmake/generator.py
+++ b/mesonbuild/cmake/generator.py
@@ -67,7 +67,7 @@ def parse_generator_expressions(
def target_file(arg: str) -> str:
if arg not in trace.targets:
- mlog.warning(f"Somewhere in your CMakeLists.txt you have '$<TARGET_FILE:{arg}>'. In cmake, this evaluates to the path to '{arg}'. If '{arg}' does not exist, cmake errors out. We think that '{arg}' does not exist, so we do not know its path and just return an empty string.")
+ mlog.warning(f"Unable to evaluate the cmake variable '$<TARGET_FILE:{arg}>'.")
return ''
tgt = trace.targets[arg]
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py
index e841c7a..04c40a9 100644
--- a/mesonbuild/cmake/traceparser.py
+++ b/mesonbuild/cmake/traceparser.py
@@ -236,8 +236,7 @@ class CMakeTraceParser:
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])
+ "We evaluated the cmake variable '{}' to an empty string, which is not a valid path to an executable.".format(src[0])
)
ctgt.working_dir = Path(parse_generator_expressions(str(ctgt.working_dir), self)) if ctgt.working_dir is not None else None