Uses a list of
build_target_ptr and a valid
to schedule and execute the compilation and linking of package targets.
The package build process (
build_package) comprises three steps:
- Target sorting: topological sort of the target dependency graph (
- Target scheduling: group targets into schedule regions based on the sorting (
- Target building: generate targets by compilation or linking
If compiled with OpenMP, targets will be build in parallel where possible.
The backend process supports incremental compilation whereby targets are not
re-compiled if their corresponding dependencies have not been modified.
Source-based targets (i.e. objects) are not re-compiled if the corresponding source
file is unmodified AND all of the target dependencies are not marked for re-compilation
Link targets (i.e. executables and libraries) are not re-compiled if the
target output file already exists AND all of the target dependencies are not marked for
Source file modification is determined by a file digest (hash) which is calculated during
the source parsing phase (fpm_source_parsing) and cached to disk after a target is
Top-level routine to build package described by
Construct a build schedule from the sorted targets.Read more…
Topologically sort a target for scheduling by
recursing over its dependencies.Read more…