add_executable¶
add_executable :: fn (name: string) Assembly
Add new executable assembly into the current compilation queue. Assembly with specified name is compiled into binary or it can be just executed in compile-time without any output created. Assemblies are compiled after build_entry function execution in order they are added.
Example¶
build :: fn () #build_entry {
exe :: add_executable("MyProgram");
add_unit(exe, "src/main.bl");
mode :: get_build_mode(exe);
switch mode {
BuildMode.Debug {
set_output_dir(exe, "build/debug");
}
BuildMode.ReleaseSmall,
BuildMode.ReleaseFast {
set_output_dir(exe, "build/release");
}
}
}
Declared in: build.bl