From f80692cf600675bae4d12810c8119a62e76aa701 Mon Sep 17 00:00:00 2001 From: Fred Baksik Date: Sat, 7 Jul 2018 07:27:21 -0400 Subject: GHS: Add platform selection support --- Help/generator/Green Hills MULTI.rst | 5 +++++ Source/cmGlobalGhsMultiGenerator.cxx | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/Help/generator/Green Hills MULTI.rst b/Help/generator/Green Hills MULTI.rst index daebfcd..7da93dd 100644 --- a/Help/generator/Green Hills MULTI.rst +++ b/Help/generator/Green Hills MULTI.rst @@ -13,6 +13,11 @@ The ``-T `` 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`` diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index c980746..ddf8147 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -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; } -- cgit v0.12