diff options
author | Fred Baksik <frodak17@gmail.com> | 2018-07-07 11:27:21 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2018-07-07 11:27:21 (GMT) |
commit | 5d40d2b44fe93e223bd7802797b4cd430656790e (patch) | |
tree | 8eb69b5edb8a0cc4676088aa23b933a8e90df1e0 /Source/cmGlobalGhsMultiGenerator.cxx | |
parent | 4330f10186e994b3a7b64729f8b4e64e10a30896 (diff) | |
download | CMake-5d40d2b44fe93e223bd7802797b4cd430656790e.zip CMake-5d40d2b44fe93e223bd7802797b4cd430656790e.tar.gz CMake-5d40d2b44fe93e223bd7802797b4cd430656790e.tar.bz2 |
GHS: Support ARM, PPC, 86 architectures
-- Update -A option to choose target architecture.
-- Update commentary about which variables are used to control toolset and target settings
-- Remove setting CMAKE_SYSTEM_PROCESSOR because the value is overwritten to be "" by subsequent CMAKE processing
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 1e104ee..804a010 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -41,11 +41,29 @@ void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry& entry) "Generates Green Hills MULTI files (experimental, work-in-progress)."; } +bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p, + cmMakefile* mf) +{ + if (p == "") { + cmSystemTools::Message( + "Green Hills MULTI: -A <arch> not specified; defaulting to \"arm\""); + std::string arch = "arm"; + + /* store the platform name for later use + * -- already done if -A<arch> was specified + */ + mf->AddCacheDefinition("CMAKE_GENERATOR_PLATFORM", arch.c_str(), + "Name of generator platform.", + cmStateEnums::INTERNAL); + } + + return true; +} + void cmGlobalGhsMultiGenerator::EnableLanguage( std::vector<std::string> const& l, cmMakefile* mf, bool optional) { mf->AddDefinition("CMAKE_SYSTEM_NAME", "GHS-MULTI"); - mf->AddDefinition("CMAKE_SYSTEM_PROCESSOR", "ARM"); const std::string ghsCompRoot(GetCompRoot()); mf->AddDefinition("GHS_COMP_ROOT", ghsCompRoot.c_str()); |