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.
This commit is contained in:
parent
990f77eab3
commit
e3b1be24a8
|
@ -508,11 +508,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
emptyDeps,
|
emptyDeps,
|
||||||
symlinkVars);
|
symlinkVars);
|
||||||
} else {
|
} 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(),
|
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
|
||||||
"Create library symlink " + targetOutput,
|
"Create library symlink " + targetOutput,
|
||||||
"CMAKE_SYMLINK_LIBRARY",
|
"CMAKE_SYMLINK_LIBRARY",
|
||||||
cmNinjaDeps(1, targetOutput),
|
outputs,
|
||||||
cmNinjaDeps(1, targetOutputReal),
|
cmNinjaDeps(1, targetOutputReal),
|
||||||
emptyDeps,
|
emptyDeps,
|
||||||
emptyDeps,
|
emptyDeps,
|
||||||
|
|
Loading…
Reference in New Issue