GHS: Add platform selection support

This commit is contained in:
Fred Baksik
2018-07-07 07:27:21 -04:00
parent a37a4a00c8
commit f80692cf60
2 changed files with 15 additions and 0 deletions

View File

@@ -13,6 +13,11 @@ The ``-T <toolset>`` can be supplied for setting the toolset to be used.
All toolsets are expected to be located at ``GHS_TOOLSET_ROOT``.
If the toolset is not specified then the latest toolset will be used.
* ``GHS_TARGET_PLATFORM``
Default to ``integrity``.
Usual values are ``integrity``, ``threadx``, ``uvelosity``,
``velosity``, ``vxworks``, ``standalone``.
* ``GHS_TOOLSET_ROOT``

View File

@@ -127,6 +127,16 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p,
cmStateEnums::INTERNAL);
}
const char* tgtPlatform = mf->GetDefinition("GHS_TARGET_PLATFORM");
if (tgtPlatform == nullptr) {
tgtPlatform = "integrity";
}
/* store the platform name for later use */
mf->AddCacheDefinition("GHS_TARGET_PLATFORM", tgtPlatform,
"Name of GHS target platform.",
cmStateEnums::INTERNAL);
return true;
}