class

Quartz::Build::Sources

Inherits Reference < Object

Resolves the sources=[...] field of an application.fam against disk. Mirrors ufbt's default: if the manifest doesn't specify sources, every top-level C/C++ file under the app dir is compiled. Globs are expanded relative to the app dir; results are deduped and sorted for reproducible compile ordering (→ reproducible FAPs).

Constants

ASM_EXTS = {".s", ".S"}
C_EXTS = {".c"}
CPP_EXTS = {".cc", ".cpp", ".cxx"}
DEFAULT_PATTERNS = ["*.c*"]

ufbt's default when sources is omitted. *.c* matches .c, .cpp, .cc.

Constructors

new(app_dir : String | Path, patterns : Array(String) | Nil = nil)
Source

Instance methods

app_dir
Source
by_kind

Split the resolved set into per-kind buckets. Convenience for the Compiler, which dispatches gcc vs g++ vs as on each group.

Source
patterns
Source
resolve

Resolve all patterns against app_dir and return the matched files. Results are deduped (same file matched by two patterns) and sorted by path for deterministic compile ordering.

Source

Nested types