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.


build :: fn () #build_entry {
    exe :: add_executable("MyProgram");
    add_unit(exe, "src/");

    mode :: get_build_mode(exe);
    switch mode {
        BuildMode.Debug {
            set_output_dir(exe, "build/debug");

        BuildMode.ReleaseFast {
            set_output_dir(exe, "build/release");

Declared in: