- Began refactoring TDF build scripts

- Separated TDF validation and mapping generation
- Moving away from the JSON mapping file, to a generated header file containing the TDF mapping.
- Other bits of tidying
This commit is contained in:
Nav
2023-12-12 23:19:21 +00:00
parent 275885e6ec
commit ec51a21846
10 changed files with 273 additions and 189 deletions

View File

@@ -0,0 +1,39 @@
#pragma once
#include <string>
#include <map>
#include "src/Targets/TargetFamily.hpp"
namespace Targets::TargetDescription
{
struct GeneratedMapping
{
struct BriefTargetDescriptor
{
std::string targetName;
std::string configValue;
TargetFamily targetFamily;
std::string relativeTdfPath;
constexpr BriefTargetDescriptor(
const std::string& targetName,
const std::string& configValue,
TargetFamily targetFamily,
const std::string& relativeTdfPath
)
: targetName(targetName)
, configValue(configValue)
, targetFamily(targetFamily)
, relativeTdfPath(relativeTdfPath)
{}
};
/*
* The @MAPPING_PLACEHOLDER@ comment below will be replaced with the TDF mapping
*/
static const inline std::map<std::string, BriefTargetDescriptor> map = {
//@MAPPING_PLACEHOLDER@
};
};
}