summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index ddf8147..17fac41 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -335,8 +335,26 @@ void cmGlobalGhsMultiGenerator::WriteMacros()
void cmGlobalGhsMultiGenerator::WriteHighLevelDirectives()
{
- *this->GetBuildFileStream()
- << "primaryTarget=arm_integrity.tgt" << std::endl;
+ /* set primary target */
+ std::string tgt;
+ const char* t =
+ this->GetCMakeInstance()->GetCacheDefinition("GHS_PRIMARY_TARGET");
+ if (t) {
+ tgt = t;
+ this->GetCMakeInstance()->MarkCliAsUsed("GHS_PRIMARY_TARGET");
+ } else {
+ const char* a =
+ this->GetCMakeInstance()->GetCacheDefinition("CMAKE_GENERATOR_PLATFORM");
+ const char* p =
+ this->GetCMakeInstance()->GetCacheDefinition("GHS_TARGET_PLATFORM");
+ tgt = (a ? a : "");
+ tgt += "_";
+ tgt += (p ? p : "");
+ tgt += ".tgt";
+ }
+
+ *this->GetBuildFileStream() << "primaryTarget=" << tgt << std::endl;
+
char const* const customization =
this->GetCMakeInstance()->GetCacheDefinition("GHS_CUSTOMIZATION");
if (NULL != customization && strlen(customization) > 0) {