mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 03:48:02 +08:00
cmMakefileTargetGenerator: Clarify name of relative path conversion helper
This commit is contained in:
@@ -1775,7 +1775,7 @@ public:
|
|||||||
{
|
{
|
||||||
// Construct the name of the next object.
|
// Construct the name of the next object.
|
||||||
this->NextObject = this->OutputConverter->ConvertToOutputFormat(
|
this->NextObject = this->OutputConverter->ConvertToOutputFormat(
|
||||||
this->MaybeConvertToRelativePath(obj), cmOutputConverter::RESPONSE);
|
this->MaybeRelativeToCurBinDir(obj), cmOutputConverter::RESPONSE);
|
||||||
|
|
||||||
// Roll over to next string if the limit will be exceeded.
|
// Roll over to next string if the limit will be exceeded.
|
||||||
if (this->LengthLimit != std::string::npos &&
|
if (this->LengthLimit != std::string::npos &&
|
||||||
@@ -1796,13 +1796,13 @@ public:
|
|||||||
void Done() { this->Strings.push_back(this->CurrentString); }
|
void Done() { this->Strings.push_back(this->CurrentString); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string MaybeConvertToRelativePath(std::string const& obj)
|
std::string MaybeRelativeToCurBinDir(std::string const& path)
|
||||||
{
|
{
|
||||||
if (!this->StateDir.ContainsBoth(this->StateDir.GetCurrentBinary(), obj)) {
|
std::string const& base = this->StateDir.GetCurrentBinary();
|
||||||
return obj;
|
if (!this->StateDir.ContainsBoth(base, path)) {
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
return cmSystemTools::ForceToRelativePath(
|
return cmSystemTools::ForceToRelativePath(base, path);
|
||||||
this->StateDir.GetCurrentBinary(), obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string>& Strings;
|
std::vector<std::string>& Strings;
|
||||||
|
Reference in New Issue
Block a user