33 lines
No EOL
563 B
C++
33 lines
No EOL
563 B
C++
#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;
|
|
} |