ListDependencies
Summary
Creates a text file containing all file dependencies for the given source.
This function can be useful to pipe FASTBuild dependency inspection inside another build system.
ListDependencies( alias ) ; (optional) Alias
{
.Source ; Source target (filename or node name)
.Dest ; Destination filename where dependent files list will be exported
.SourcePattern ; (optional) String, or array of strings, to filter exported dependencies
.PreBuildDependencies ; (optional) Force targets to be built before this ListDependencies (Rarely needed)
}
Details
- Output file format is simple: on file per line.
- Each dependency is always expressed as an absolute path.
- Results are sorted lexically, by ascending order.
- Output file is using CRLF on Windows, and LF on other platforms.
- List only direct dependencies of the source, no recursive descent.
Examples
The following sample BFF:
ObjectList( 'SimpleObject' )
{
.CompilerInputFiles = "C:/Test/SimpleObject.cpp"
.CompilerOutputPath = "C:/Test/Output"
}
ListDependencies( 'SimpleDependencies' )
{
.Source = 'SimpleObject'
.SourcePattern = { '*.h', '*.c', '*.cpp' }
.Dest = 'C:/Test/Output/Dependencies.txt'
}
With 'SimpleObject.cpp' containing:
#include "HeaderA.h"
#include "HeaderB.h"
Will generate the following 'Dependencies.txt' output file:
C:/Test/HeaderA.h
C:/Test/HeaderB.h
C:/Test/SimpleObject.cpp