IdeBuildSystem: LibIDE Reference Manual

## IdeBuildSystem IdeBuildSystem |

## Functions

#define | IDE_TYPE_BUILD_SYSTEM
GFile * | ide_build_system_get_project_file ()
void | ide_build_system_get_build_flags_async ()
gchar ** | ide_build_system_get_build_flags_finish ()
void | ide_build_system_new_async ()
IdeBuildSystem * | ide_build_system_new_finish ()
IdeBuilder * | ide_build_system_get_builder ()

## Properties

GFile * | project-file | Read / Write / Construct Only

## Types and Values

#define | IDE_BUILD_SYSTEM_EXTENSION_POINT
struct | IdeBuildSystemClass
| IdeBuildSystem

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeBuildSystem
                ├── IdeAutotoolsBuildSystem
                ╰── IdeDirectoryBuildSystem

## Description

## Functions

### IDE_TYPE_BUILD_SYSTEM

    #define IDE_TYPE_BUILD_SYSTEM            (ide_build_system_get_type())

### ide_build_system_get_project_file ()

    GFile *
    ide_build_system_get_project_file (IdeBuildSystem *self);

Gets the “project-file” property.

#### Parameters

self | A IdeBuildSystem. | [in]

#### Returns

A GFile.

[transfer none]

### ide_build_system_get_build_flags_async ()

    void
    ide_build_system_get_build_flags_async
                                   (IdeBuildSystem *self,
                                    IdeFile *file,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously requests the build flags for a file. For autotools and C based projects, this would be similar to the $CFLAGS variable and is suitable for generating warnings and errors with clang.

### ide_build_system_get_build_flags_finish ()

    gchar **
    ide_build_system_get_build_flags_finish
                                   (IdeBuildSystem *self,
                                    GAsyncResult *result,
                                    GError **error);

Completes an asynchronous request to get the build flags for a file.

#### Returns

An array of strings containing the build flags, or `NULL` upon failure and `error` is set.

[transfer none]

### ide_build_system_new_async ()

    void
    ide_build_system_new_async (IdeContext *context,
                                GFile *project_file,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously creates a new IdeBuildSystem instance using the registered GIOExtensionPoint system. Each extension point will be tried asynchronously by priority until one has been found that supports `project_file` .

If no build system could be found, then `ide_build_system_new_finish()` will return `NULL`.

#### Parameters

context | IdeBuildSystem |
project_file | A GFile containing the directory or project file. |
cancellable | A GCancellable. | [allow-none]
callback | A callback to execute upon completion |
user_data | User data for `callback` . |

### ide_build_system_new_finish ()

    IdeBuildSystem *
    ide_build_system_new_finish (GAsyncResult *result,
                                 GError **error);

Complete an asynchronous call to `ide_build_system_new_async()`.

#### Returns

An IdeBuildSystem if successful; otherwise `NULL` and `error` is set.

[transfer full]

### ide_build_system_get_builder ()

    IdeBuilder *
    ide_build_system_get_builder (IdeBuildSystem *system,
                                  GKeyFile *config,
                                  IdeDevice *device,
                                  GError **error);

This function should return an IdeBuilder that can be used to perform a build of the project using the configuration specified. `device` may be a non-local device, for which cross-compilation may be necessary.

#### Parameters

system | The IdeBuildSystem to perform the build. |
config | The configuration options for the build. |
device | The IdeDevice the result should be able to run on. |

#### Returns

An IdeBuilder or `NULL` and `error` is set.

[transfer full]

## Types and Values

### IDE_BUILD_SYSTEM_EXTENSION_POINT

    #define IDE_BUILD_SYSTEM_EXTENSION_POINT "org.gnome.libide.extensions.build-system"

### struct IdeBuildSystemClass

    struct IdeBuildSystemClass {
      IdeObjectClass parent;

      IdeBuilder *(*get_builder)            (IdeBuildSystem       *system,
                                             GKeyFile             *config,
                                             IdeDevice            *device,
                                             GError              **error);
      void        (*get_build_flags_async)  (IdeBuildSystem       *self,
                                             IdeFile              *file,
                                             GCancellable         *cancellable,
                                             GAsyncReadyCallback   callback,
                                             gpointer              user_data);
      gchar     **(*get_build_flags_finish) (IdeBuildSystem       *self,
                                             GAsyncResult         *result,
                                             GError              **error);
    };

### IdeBuildSystem

    typedef struct _IdeBuildSystem IdeBuildSystem;

## Property Details

### The `“project-file”` property

      “project-file”             GFile *

The project file.

Flags: Read / Write / Construct Only