feature. See also
. The project being documented here (as the example) is the Zig library itself.
Configuration.OptionalCSourceLanguage
pub const OptionalCSourceLanguage = enum(u3)
File
Code
pub const OptionalCSourceLanguage = enum(u3) {
c,
cpp,
objective_c,
objective_cpp,
assembly,
assembly_with_preprocessor,
default,
pub fn init(x: ?std.Build.Module.CSourceLanguage) @This() {
return switch (x orelse return .default) {
.c => .c,
.cpp => .cpp,
.objective_c => .objective_c,
.objective_cpp => .objective_cpp,
.assembly => .assembly,
.assembly_with_preprocessor => .assembly_with_preprocessor,
};
}
pub fn get(this: @This()) ?std.Build.Module.CSourceLanguage {
return switch (this) {
.c => .c,
.cpp => .cpp,
.objective_c => .objective_c,
.objective_cpp => .objective_cpp,
.assembly => .assembly,
.assembly_with_preprocessor => .assembly_with_preprocessor,
.default => null,
};
}
}