Groups multiple Configuration and source files with their compile and link flags. More...
#include <Build.h>
Classes | |
struct | File |
Project list of files. More... | |
Public Member Functions | |
Project (TargetType::Type targetType, StringView name) | |
bool | setRootDirectory (StringView file) |
Set root directory for this project (all relative paths will be relative to this one) More... | |
bool | addPresetConfiguration (Configuration::Preset preset, const Parameters ¶meters, StringView configurationName=StringView()) |
Add a configuration with a given name, started by cloning options of a specific Preset. More... | |
Configuration * | getConfiguration (StringView configurationName) |
Get Configuration with the matching configurationName More... | |
const Configuration * | getConfiguration (StringView configurationName) const |
Get Configuration with the matching configurationName More... | |
bool | addDirectory (StringView subdirectory, StringView filter) |
Add all files from specific subdirectory (relative to project root) matching given filter. More... | |
bool | addFile (StringView singleFile) |
Add a single file to the project. More... | |
bool | removeFiles (StringView subdirectory, StringView filter) |
Remove files matching the given filter. More... | |
Result | validate () const |
Validates this project for it to contain a valid combination of flags. More... | |
Public Attributes | |
TargetType::Type | targetType = TargetType::Executable |
Type of build artifact. More... | |
String | name |
Project name. More... | |
String | rootDirectory |
Project root directory. More... | |
String | targetName |
Project target name. More... | |
String | iconPath |
Icon location. More... | |
Vector< File > | files |
Files that belong to the project. More... | |
CompileFlags | compile |
Shared CompileFlags for all files in the project. More... | |
LinkFlags | link |
Shared LinkFlags for all files in the project. More... | |
Vector< Configuration > | configurations |
Build configurations created inside the project. More... | |
Groups multiple Configuration and source files with their compile and link flags.
bool SC::Build::Project::addDirectory | ( | StringView | subdirectory, |
StringView | filter | ||
) |
Add all files from specific subdirectory (relative to project root) matching given filter.
subdirectory | The subdirectory to search files from, absolute or relative to project root. No * allowed. |
filter | The suffix filter that is appended to subdirectory (can contain * ) |
bool SC::Build::Project::addFile | ( | StringView | singleFile | ) |
Add a single file to the project.
bool SC::Build::Project::addPresetConfiguration | ( | Configuration::Preset | preset, |
const Parameters & | parameters, | ||
StringView | configurationName = StringView() |
||
) |
Add a configuration with a given name, started by cloning options of a specific Preset.
Configuration * SC::Build::Project::getConfiguration | ( | StringView | configurationName | ) |
Get Configuration with the matching configurationName
const Configuration * SC::Build::Project::getConfiguration | ( | StringView | configurationName | ) | const |
Get Configuration with the matching configurationName
bool SC::Build::Project::removeFiles | ( | StringView | subdirectory, |
StringView | filter | ||
) |
Remove files matching the given filter.
Useful to remove only a specific file type after Project::addDirectory
subdirectory | The subdirectory to search files into, absolute or relative to project root. No * allowed. |
filter | The suffix filter that is appended to subdirectory (can contain * ) |
bool SC::Build::Project::setRootDirectory | ( | StringView | file | ) |
Set root directory for this project (all relative paths will be relative to this one)
Result SC::Build::Project::validate | ( | ) | const |
Validates this project for it to contain a valid combination of flags.
CompileFlags SC::Build::Project::compile |
Shared CompileFlags for all files in the project.
Vector<Configuration> SC::Build::Project::configurations |
Build configurations created inside the project.
String SC::Build::Project::iconPath |
Icon location.
TargetType::Type SC::Build::Project::targetType = TargetType::Executable |
Type of build artifact.