buildCommand(displayName:executable:arguments:environment:inputFiles:outputFiles:)
Returns a command that runs when any of its output files are needed by the build, but out-of-date.
This declaration was deprecated in SwiftPM 6.0: Use `URL` type instead of `Path`.
static func buildCommand(displayName: String?, executable: Path, arguments: [CustomStringConvertible], environment: [String : CustomStringConvertible] = [:], inputFiles: [Path] = [], outputFiles: [Path] = []) -> Command
Parameters
- displayName
An optional string to show in build logs and other status areas.
- executable
The absolute path to the executable to be invoked.
- arguments
Command-line arguments to be passed to the executable.
- environment
Environment variable assignments visible to the executable.
- inputFiles
Files on which the contents of output files may depend. Any paths passed as
arguments
should typically be passed here as well.- outputFiles
Files to be generated or updated by the executable. Any files recognizable by their extension as source files (e.g.
.swift
) are compiled into the target for which this command was generated as if in its source directory; other files are treated as resources as if explicitly listed inPackage.swift
using.process(...)
.
An output file is out-of-date if it doesn’t exist, or if any input files have changed since the command was last run.