diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-15 23:16:43 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-19 13:31:29 (GMT) |
commit | 78bfee35d5bd5cba879d92eda4310d25bc54b30e (patch) | |
tree | b8263240be0775e713a985546a2176ca8ac49fb5 /Source/cmLocalGenerator.cxx | |
parent | 4f5384e75c6a00d110d3fa3f555a3f6a4f31bb46 (diff) | |
download | CMake-78bfee35d5bd5cba879d92eda4310d25bc54b30e.zip CMake-78bfee35d5bd5cba879d92eda4310d25bc54b30e.tar.gz CMake-78bfee35d5bd5cba879d92eda4310d25bc54b30e.tar.bz2 |
Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 24d9b91..62b0f5e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -555,9 +555,9 @@ void cmLocalGenerator::GenerateTargetManifest() } void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, - const char* lang, - cmSourceFile& source, - cmTarget& target) + const char* lang, + cmSourceFile& source, + cmGeneratorTarget& target) { std::string objectDir = cmSystemTools::GetFilenamePath(std::string(ofname)); objectDir = this->Convert(objectDir.c_str(),START_OUTPUT,SHELL); @@ -577,7 +577,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, flags += " "; { std::vector<std::string> includes; - this->GetIncludeDirectories(includes, &target, lang); + this->GetIncludeDirectories(includes, target.Target, lang); flags += this->GetIncludeFlags(includes, lang); } flags += this->Makefile->GetDefineFlags(); @@ -636,7 +636,8 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, ); } -void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) +void cmLocalGenerator::AddBuildTargetRule(const char* llang, + cmGeneratorTarget& target) { cmStdString objs; std::vector<std::string> objVector; @@ -669,8 +670,8 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) } std::string createRule = "CMAKE_"; createRule += llang; - createRule += target.GetCreateRuleVariable(); - std::string targetName = target.GetFullName(); + createRule += target.Target->GetCreateRuleVariable(); + std::string targetName = target.Target->GetFullName(); // Executable : // Shared Library: // Static Library: @@ -678,7 +679,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) std::string linkLibs; // should be set std::string flags; // should be set std::string linkFlags; // should be set - this->GetTargetFlags(linkLibs, flags, linkFlags, target); + this->GetTargetFlags(linkLibs, flags, linkFlags, *target.Target); cmLocalGenerator::RuleVariables vars; vars.Language = llang; vars.Objects = objs.c_str(); @@ -715,7 +716,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) // Store this command line. commandLines.push_back(commandLine); } - std::string targetFullPath = target.GetFullPath(); + std::string targetFullPath = target.Target->GetFullPath(); // Generate a meaningful comment for the command. std::string comment = "Linking "; comment += llang; @@ -729,7 +730,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) comment.c_str(), this->Makefile->GetStartOutputDirectory() ); - target.AddSourceFile + target.Target->AddSourceFile (this->Makefile->GetSource(targetFullPath.c_str())); } @@ -737,11 +738,11 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) void cmLocalGenerator ::CreateCustomTargetsAndCommands(std::set<cmStdString> const& lang) { - cmTargets &tgts = this->Makefile->GetTargets(); - for(cmTargets::iterator l = tgts.begin(); + cmGeneratorTargetsType tgts = this->Makefile->GetGeneratorTargets(); + for(cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); l++) { - cmTarget& target = l->second; + cmGeneratorTarget& target = *l->second; switch(target.GetType()) { case cmTarget::STATIC_LIBRARY: @@ -749,12 +750,12 @@ void cmLocalGenerator case cmTarget::MODULE_LIBRARY: case cmTarget::EXECUTABLE: { - const char* llang = target.GetLinkerLanguage(); + const char* llang = target.Target->GetLinkerLanguage(); if(!llang) { cmSystemTools::Error ("CMake can not determine linker language for target:", - target.GetName()); + target.Target->GetName()); return; } // if the language is not in the set lang then create custom @@ -1780,7 +1781,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, //---------------------------------------------------------------------------- void cmLocalGenerator::AddArchitectureFlags(std::string& flags, - cmTarget* target, + cmGeneratorTarget* target, const char *lang, const char* config) { |