diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-14 21:14:43 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-14 22:41:19 (GMT) |
commit | 983c00f8f97260e7650fcc440047b33898f0363c (patch) | |
tree | 49fc7fc17465e7d613e82d6cf305fdc4bf3f2f12 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 088fcbf733a7d1968fc3586a7077f22cb41e1917 (diff) | |
download | CMake-983c00f8f97260e7650fcc440047b33898f0363c.zip CMake-983c00f8f97260e7650fcc440047b33898f0363c.tar.gz CMake-983c00f8f97260e7650fcc440047b33898f0363c.tar.bz2 |
Generators: Use GetType from the cmGeneratorTarget.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index c64fe50..02e47bd 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -87,7 +87,7 @@ void cmNinjaNormalTargetGenerator::Generate() // Write the build statements this->WriteObjectBuildStatements(); - if(this->GetTarget()->GetType() == cmTarget::OBJECT_LIBRARY) + if(this->GetGeneratorTarget()->GetType() == cmTarget::OBJECT_LIBRARY) { this->WriteObjectLibStatement(); } @@ -103,7 +103,7 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() cmGlobalNinjaGenerator::WriteDivider(this->GetRulesFileStream()); this->GetRulesFileStream() << "# Rules for each languages for " - << cmTarget::GetTargetTypeName(this->GetTarget()->GetType()) + << cmTarget::GetTargetTypeName(this->GetGeneratorTarget()->GetType()) << " target " << this->GetTargetName() << "\n\n"; @@ -133,7 +133,7 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const { - switch (this->GetTarget()->GetType()) { + switch (this->GetGeneratorTarget()->GetType()) { case cmTarget::STATIC_LIBRARY: return "static library"; case cmTarget::SHARED_LIBRARY: @@ -156,7 +156,8 @@ cmNinjaNormalTargetGenerator { return this->TargetLinkLanguage + "_" - + cmTarget::GetTargetTypeName(this->GetTarget()->GetType()) + + cmTarget::GetTargetTypeName( + (cmTarget::TargetType)this->GetGeneratorTarget()->GetType()) + "_LINKER__" + cmGlobalNinjaGenerator::EncodeRuleName(this->GetTarget()->GetName()) ; @@ -166,7 +167,8 @@ void cmNinjaNormalTargetGenerator ::WriteLinkRule(bool useResponseFile) { - cmTarget::TargetType targetType = this->GetTarget()->GetType(); + cmTarget::TargetType targetType = + (cmTarget::TargetType)this->GetGeneratorTarget()->GetType(); std::string ruleName = this->LanguageLinkerRule(); // Select whether to use a response file for objects. @@ -330,7 +332,7 @@ cmNinjaNormalTargetGenerator return linkCmds; } } - switch (this->GetTarget()->GetType()) { + switch (this->GetGeneratorTarget()->GetType()) { case cmTarget::STATIC_LIBRARY: { // We have archive link commands set. First, delete the existing archive. { |