Merge topic 'ninja-fixes'

6b31d39 Ninja: don't shadow 'outputs' variable
9b311fb Ninja: add soname test case
e3b1be2 Ninja: Clean all symlink created for libraries.
990f77e Ninja: remove int/size_t warning
This commit is contained in:
David Cole
2012-07-09 14:23:57 -04:00
committed by CMake Topic Stage
3 changed files with 25 additions and 3 deletions

View File

@@ -558,7 +558,7 @@ void cmGlobalNinjaGenerator::AddRule(const std::string& name,
restat,
generator);
this->RuleCmdLength[name] = command.size();
this->RuleCmdLength[name] = (int) command.size();
}
bool cmGlobalNinjaGenerator::HasRule(const std::string &name)

View File

@@ -508,11 +508,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
emptyDeps,
symlinkVars);
} else {
symlinkVars["SONAME"] = this->GetTargetFilePath(this->TargetNameSO);
cmNinjaDeps symlinks;
const std::string soName = this->GetTargetFilePath(this->TargetNameSO);
// If one link has to be created.
if (targetOutputReal == soName || targetOutput == soName) {
symlinkVars["SONAME"] = soName;
} else {
symlinkVars["SONAME"] = "";
symlinks.push_back(soName);
}
symlinks.push_back(targetOutput);
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
"Create library symlink " + targetOutput,
"CMAKE_SYMLINK_LIBRARY",
cmNinjaDeps(1, targetOutput),
symlinks,
cmNinjaDeps(1, targetOutputReal),
emptyDeps,
emptyDeps,