summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2012-04-02 10:35:55 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-07-09 18:15:08 (GMT)
commite3b1be24a808fdb3dc0482a33fe423c0eb945a7b (patch)
treec5e037a88d052b43d16ce89506f6486c8ccd90a6
parent990f77eab35675f323fb320a75e843eb7bddee21 (diff)
downloadCMake-e3b1be24a808fdb3dc0482a33fe423c0eb945a7b.zip
CMake-e3b1be24a808fdb3dc0482a33fe423c0eb945a7b.tar.gz
CMake-e3b1be24a808fdb3dc0482a33fe423c0eb945a7b.tar.bz2
Ninja: Clean all symlink created for libraries.
'ninja -t clean' only cleans built output and dep files so all file created as a side effect and not mentioned in the 'build' statement would be omitted.
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6befb05..4787cb3 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 outputs;
+ 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"] = "";
+ outputs.push_back(soName);
+ }
+ outputs.push_back(targetOutput);
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
"Create library symlink " + targetOutput,
"CMAKE_SYMLINK_LIBRARY",
- cmNinjaDeps(1, targetOutput),
+ outputs,
cmNinjaDeps(1, targetOutputReal),
emptyDeps,
emptyDeps,