diff options
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdb..ba623d5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" @@ -43,9 +44,7 @@ cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator() std::string cmGhsMultiTargetGenerator::GetRelBuildFilePath( const cmGeneratorTarget* target) { - std::string output; - char const* folderProp = target->GetProperty("FOLDER"); - output = NULL == folderProp ? "" : folderProp; + std::string output = target->GetEffectiveFolderName(); cmSystemTools::ConvertToUnixSlashes(output); if (!output.empty()) { output += "/"; @@ -131,7 +130,7 @@ void cmGhsMultiTargetGenerator::Generate() this->WriteCompilerFlags(config, language); this->WriteCompilerDefinitions(config, language); this->WriteIncludes(config, language); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { this->WriteTargetLinkLibraries(config, language); } this->WriteCustomCommands(); @@ -175,7 +174,7 @@ GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag( GhsMultiGpj::Types output; if (cmGhsMultiTargetGenerator::DetermineIfTargetGroup(target)) { output = GhsMultiGpj::INTERGRITY_APPLICATION; - } else if (target->GetType() == cmState::STATIC_LIBRARY) { + } else if (target->GetType() == cmStateEnums::STATIC_LIBRARY) { output = GhsMultiGpj::LIBRARY; } else { output = GhsMultiGpj::PROGRAM; @@ -196,13 +195,13 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config, std::string outputDir(this->GetOutputDirectory(config)); std::string outputFilename(this->GetOutputFilename(config)); - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string const static_library_suffix = this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"); *this->GetFolderBuildStreams() << " -o \"" << outputDir << outputFilename << static_library_suffix << "\"" << std::endl; - } else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + } else if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (notKernel && !this->IsTargetGroup()) { *this->GetFolderBuildStreams() << " -relprog" << std::endl; } @@ -244,7 +243,7 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, flags, this->GeneratorTarget, lang); // Append old-style preprocessor definition flags. - if (std::string(" ") != std::string(this->Makefile->GetDefineFlags())) { + if (this->Makefile->GetDefineFlags() != " ") { this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); } @@ -362,9 +361,15 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); + CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator, + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); + this->LocalGenerator->GetTargetFlags( - config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, - this->GeneratorTarget, useWatcomQuote); + linkLineComputer.get(), config, linkLibraries, flags, linkFlags, + frameworkPath, linkPath, this->GeneratorTarget); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { |