[gnome-builder] meson: add debugging information on build targets



commit 24d713f3fc68340407d2cf56a6bccc00c851bd99
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 18 00:41:38 2017 -0700

    meson: add debugging information on build targets

 src/plugins/meson/gbp-meson-build-system.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-build-system.c b/src/plugins/meson/gbp-meson-build-system.c
index 9dbdbc4..fc4609b 100644
--- a/src/plugins/meson/gbp-meson-build-system.c
+++ b/src/plugins/meson/gbp-meson-build-system.c
@@ -835,6 +835,25 @@ gbp_meson_build_system_get_build_targets_finish (IdeBuildSystem  *build_system,
 
   ret = g_task_propagate_pointer (G_TASK (result), error);
 
+#ifdef IDE_ENABLE_TRACE
+  if (ret != NULL)
+    {
+      IDE_TRACE_MSG ("Discovered %u targets", ret->len);
+
+      for (guint i = 0; i < ret->len; i++)
+        {
+          IdeBuildTarget *target = g_ptr_array_index (ret, i);
+          g_autofree gchar *name = NULL;
+
+          g_assert (GBP_IS_MESON_BUILD_TARGET (target));
+          g_assert (IDE_IS_BUILD_TARGET (target));
+
+          name = ide_build_target_get_name (target);
+          IDE_TRACE_MSG ("[%u]: %s", i, name);
+        }
+    }
+#endif
+
   IDE_RETURN (ret);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]