Merge topic 'ninja-LIBPATH'

1e47ccb Ninja: add option to enforce usage of response files
e31df03 Ninja: move <OBJECTS> in front of the first linker option
8d674e7 Ninja: move -LIBPATH behind -link option
This commit is contained in:
Brad King
2012-10-02 10:07:32 -04:00
committed by CMake Topic Stage
9 changed files with 85 additions and 40 deletions

View File

@@ -323,10 +323,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
// Collect up flags to link in needed libraries.
cmOStringStream linklibs;
this->LocalGenerator->OutputLinkLibraries(linklibs, *this->GeneratorTarget,
std::string linkLibs;
std::string frameworkPath;
std::string linkPath;
this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
*this->GeneratorTarget,
relink);
linkLibs = frameworkPath + linkPath + linkLibs;
// Construct object file lists that may be needed to expand the
// rule.
std::string buildObjs;
@@ -365,8 +368,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.TargetVersionMajor = targetVersionMajor.c_str();
vars.TargetVersionMinor = targetVersionMinor.c_str();
std::string linkString = linklibs.str();
vars.LinkLibraries = linkString.c_str();
vars.LinkLibraries = linkLibs.c_str();
vars.Flags = flags.c_str();
vars.LinkFlags = linkFlags.c_str();
// Expand placeholders in the commands.