diff options
author | Fred Baksik <frodak17@gmail.com> | 2018-07-07 11:27:21 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2018-07-11 12:33:21 (GMT) |
commit | f80692cf600675bae4d12810c8119a62e76aa701 (patch) | |
tree | 115c01bc19fde67735f3b100e17ce09948d778ae | |
parent | a37a4a00c8b8982c89ffc99505de097d3b2d7300 (diff) | |
download | CMake-f80692cf600675bae4d12810c8119a62e76aa701.zip CMake-f80692cf600675bae4d12810c8119a62e76aa701.tar.gz CMake-f80692cf600675bae4d12810c8119a62e76aa701.tar.bz2 |
GHS: Add platform selection support
-rw-r--r-- | Help/generator/Green Hills MULTI.rst | 5 | ||||
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 10 |
2 files changed, 15 insertions, 0 deletions
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 <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`` 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; } |