McuSupport: Store macros as part of McuSdkRepository

To support extending the macros and calling the
McuTargetFactory::expandVariables function statically, the macros are
added as part of the SdkRepository.

This commit also adds helper functions to extend macros other than the
ones created from the packages.

Change-Id: Ie7d2a9ad626782eec18738bdd3472ffd202e7a36
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Yasser Grimes
2022-10-24 18:50:27 +03:00
parent a08c49b321
commit 7938a8a80f
8 changed files with 90 additions and 24 deletions

View File

@@ -14,4 +14,18 @@ struct McuTargetDescription;
McuTarget::OS deduceOperatingSystem(const McuTargetDescription &);
QString removeRtosSuffix(const QString &environmentVariable);
template<typename T>
class asKeyValueRange
{
public:
asKeyValueRange(T &data)
: m_data{data}
{}
auto begin() { return m_data.keyValueBegin(); }
auto end() { return m_data.keyValueEnd(); }
private:
T &m_data;
};
} // namespace McuSupport::Internal