unionstd.Build.Step.ConfigHeader.Style[src]

Fields

autoconf_undef: std.Build.LazyPath

A configure format supported by autotools that uses #undef foo to mark lines that can be substituted with different values.

autoconf: std.Build.LazyPath

Deprecated. Renamed to autoconf_undef. To be removed after 0.14.0 is tagged.

autoconf_at: std.Build.LazyPath

A configure format supported by autotools that uses @FOO@ output variables.

cmake: std.Build.LazyPath

The configure format supported by CMake. It uses @FOO@, ${} and #cmakedefine for template substitution.

blank

Instead of starting with an input file, start with nothing.

nasm

Start with nothing, like blank, and output a nasm .asm file.

Functions

FunctiongetPath[src]

pub fn getPath(style: Style) ?std.Build.LazyPath

Parameters

style: Style

Source Code

Source code
pub fn getPath(style: Style) ?std.Build.LazyPath {
    switch (style) {
        .autoconf_undef, .autoconf, .autoconf_at, .cmake => |s| return s,
        .blank, .nasm => return null,
    }
}

Source Code

Source code
pub const Style = union(enum) {
    /// A configure format supported by autotools that uses `#undef foo` to
    /// mark lines that can be substituted with different values.
    autoconf_undef: std.Build.LazyPath,
    /// Deprecated. Renamed to `autoconf_undef`.
    /// To be removed after 0.14.0 is tagged.
    autoconf: std.Build.LazyPath,
    /// A configure format supported by autotools that uses `@FOO@` output variables.
    autoconf_at: std.Build.LazyPath,
    /// The configure format supported by CMake. It uses `@FOO@`, `${}` and
    /// `#cmakedefine` for template substitution.
    cmake: std.Build.LazyPath,
    /// Instead of starting with an input file, start with nothing.
    blank,
    /// Start with nothing, like blank, and output a nasm .asm file.
    nasm,

    pub fn getPath(style: Style) ?std.Build.LazyPath {
        switch (style) {
            .autoconf_undef, .autoconf, .autoconf_at, .cmake => |s| return s,
            .blank, .nasm => return null,
        }
    }
}