diff options
author | David Cole <david.cole@kitware.com> | 2012-07-09 18:23:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-07-09 18:23:57 (GMT) |
commit | 2e4327218749f59f84db59ea3e464fbd00e0f159 (patch) | |
tree | d868f7ff3e5edc0e0f34b47fd05236d8a0fb4230 /Source | |
parent | ada7fe248a0b0c50a3487150cdfc2add6e8f8b22 (diff) | |
parent | 6b31d395513fe8ea7b17489b7235c16c1ebad7e1 (diff) | |
download | CMake-2e4327218749f59f84db59ea3e464fbd00e0f159.zip CMake-2e4327218749f59f84db59ea3e464fbd00e0f159.tar.gz CMake-2e4327218749f59f84db59ea3e464fbd00e0f159.tar.bz2 |
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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 6392ecd..9829d19 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -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) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 6befb05..0cf90aa 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -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, |