[gnome-builder/gnome-builder-3-28] build-system: post-process build flags in aggregate
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-28] build-system: post-process build flags in aggregate
- Date: Tue, 17 Apr 2018 04:47:27 +0000 (UTC)
commit 08045c3645751e21a70fdab1d2e345ac70385d42
Author: Christian Hergert <chergert redhat com>
Date: Mon Apr 16 21:19:33 2018 -0700
build-system: post-process build flags in aggregate
When getting build flags as a group, we might need to post
process them for various paths. We do this in the normal form,
and this ensures we do it in the aggregate form too.
src/libide/buildsystem/ide-build-system.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-system.c b/src/libide/buildsystem/ide-build-system.c
index 2d3400564..f0e7e0909 100644
--- a/src/libide/buildsystem/ide-build-system.c
+++ b/src/libide/buildsystem/ide-build-system.c
@@ -365,7 +365,9 @@ ide_build_system_post_process_build_flags (IdeBuildSystem *self,
IdeContext *context;
g_assert (IDE_IS_BUILD_SYSTEM (self));
- g_assert (flags != NULL);
+
+ if (flags == NULL || flags[0] == NULL)
+ return;
context = ide_object_get_context (IDE_OBJECT (self));
build_manager = ide_context_get_build_manager (context);
@@ -492,7 +494,9 @@ ide_build_system_get_build_flags_for_files_async (IdeBuildSystem *self,
* @result: a #GAsyncResult
* @error: a location for a #GError or %NULL
*
- * Returns: Returns a #GHashTable or #IdeFile to #GStrv
+ * Returns: (element-type Gio.File GLib.Strv): a #GHashTable or #IdeFile to #GStrv
+ *
+ * Since: 3.28
*/
GHashTable *
ide_build_system_get_build_flags_for_files_finish (IdeBuildSystem *self,
@@ -508,6 +512,17 @@ ide_build_system_get_build_flags_for_files_finish (IdeBuildSystem *self,
ret = IDE_BUILD_SYSTEM_GET_IFACE (self)->get_build_flags_for_files_finish (self, result, error);
+ if (ret != NULL)
+ {
+ GHashTableIter iter;
+ gchar **flags;
+
+ g_hash_table_iter_init (&iter, ret);
+
+ while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&flags))
+ ide_build_system_post_process_build_flags (self, flags);
+ }
+
IDE_RETURN (ret);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]