Start support for multiple build targets.
This commit is contained in:
parent
e3e03dc31f
commit
3dce256213
52 changed files with 1044 additions and 340 deletions
33
src/base/compiler/buildsystem/BuildConfig.cpp
Normal file
33
src/base/compiler/buildsystem/BuildConfig.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include "BuildConfig.h"
|
||||
|
||||
#include "YamlParser.h"
|
||||
|
||||
BuildConfig::BuildConfig(const FileSystemPath& path)
|
||||
: m_path(path)
|
||||
{
|
||||
}
|
||||
|
||||
Status BuildConfig::load()
|
||||
{
|
||||
YamlParser yaml_parser;
|
||||
if (const auto rc = yaml_parser.parse(m_path, m_content); !rc.ok())
|
||||
{
|
||||
return rc;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
FileSystemPath BuildConfig::get_directory() const
|
||||
{
|
||||
return m_path.parent_path();
|
||||
}
|
||||
|
||||
String BuildConfig::get_directory_name() const
|
||||
{
|
||||
return get_directory().stem().str();
|
||||
}
|
||||
|
||||
BuildTargetType BuildConfig::get_target_type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue