aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/modules/cmake.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index ca98b1c..2383753 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -92,7 +92,9 @@ class CMakeSubprojectHolder(InterpreterObject, ObjectHolder):
tgt = args[0]
res = self.held_object.cm_interpreter.target_info(tgt)
if res is None:
- raise InterpreterException('The CMake target {} does not exist'.format(tgt))
+ raise InterpreterException('The CMake target {} does not exist\n'.format(tgt) +
+ ' Use the following command in your meson.build to list all available targets:\n\n' +
+ ' message(\'CMaket targets:\\n - \' + \'\\n - \'.join(<cmake_subproject>.target_list()))')
# Make sure that all keys are present (if not this is a bug)
assert(all([x in res for x in ['inc', 'src', 'dep', 'tgt', 'func']]))