mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-20 21:28:23 -05:00
Remove unnecessary arbitrary CollapseFullPath second arguments
Some calls to CollapseFullPath that already have an absolute path were
updated by commit 22f38c0d6b (cmake: avoid getcwd in `CollapseFullPath`,
2020-01-14, v3.17.0-rc1~171^2) to pass an arbitrary second argument to
prevent unnecessary `getcwd` calls. Since then, the KWSys
implementation of CollapseFullPath has learned to avoid unnecessary
`getcwd` calls on its own, so we can drop the arbitrary second arguments
to our CollapseFullPath calls.
This commit is contained in:
@@ -215,8 +215,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cmSystemTools::FileIsFullPath(filename)) {
|
if (cmSystemTools::FileIsFullPath(filename)) {
|
||||||
filename = cmSystemTools::CollapseFullPath(
|
filename = cmSystemTools::CollapseFullPath(filename);
|
||||||
filename, status.GetMakefile().GetHomeOutputDirectory());
|
|
||||||
}
|
}
|
||||||
switch (doing) {
|
switch (doing) {
|
||||||
case doing_depfile:
|
case doing_depfile:
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ void AppendPaths(const std::vector<std::string>& inputs,
|
|||||||
for (std::string& it : result) {
|
for (std::string& it : result) {
|
||||||
cmSystemTools::ConvertToUnixSlashes(it);
|
cmSystemTools::ConvertToUnixSlashes(it);
|
||||||
if (cmSystemTools::FileIsFullPath(it)) {
|
if (cmSystemTools::FileIsFullPath(it)) {
|
||||||
it = cmSystemTools::CollapseFullPath(
|
it = cmSystemTools::CollapseFullPath(it);
|
||||||
it, lg->GetMakefile()->GetHomeOutputDirectory());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cm::append(output, result);
|
cm::append(output, result);
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ cmSourceFileLocation::cmSourceFileLocation(cmMakefile const* mf,
|
|||||||
this->AmbiguousExtension = true;
|
this->AmbiguousExtension = true;
|
||||||
this->Directory = cmSystemTools::GetFilenamePath(name);
|
this->Directory = cmSystemTools::GetFilenamePath(name);
|
||||||
if (cmSystemTools::FileIsFullPath(this->Directory)) {
|
if (cmSystemTools::FileIsFullPath(this->Directory)) {
|
||||||
this->Directory = cmSystemTools::CollapseFullPath(
|
this->Directory = cmSystemTools::CollapseFullPath(this->Directory);
|
||||||
this->Directory, mf->GetHomeOutputDirectory());
|
|
||||||
}
|
}
|
||||||
this->Name = cmSystemTools::GetFilenameName(name);
|
this->Name = cmSystemTools::GetFilenameName(name);
|
||||||
if (kind == cmSourceFileLocationKind::Known) {
|
if (kind == cmSourceFileLocationKind::Known) {
|
||||||
|
|||||||
Reference in New Issue
Block a user