mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmLocalGenerator: Factor out relative path conversion helpers
Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
This commit is contained in:
@@ -207,10 +207,8 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
|
||||
}
|
||||
|
||||
if (workingDirectory.empty()) {
|
||||
script +=
|
||||
this->ConvertToOutputFormat(this->MaybeConvertToRelativePath(
|
||||
this->GetCurrentBinaryDirectory(), cmd),
|
||||
cmOutputConverter::SHELL);
|
||||
script += this->ConvertToOutputFormat(
|
||||
this->MaybeRelativeToCurBinDir(cmd), cmOutputConverter::SHELL);
|
||||
} else {
|
||||
script += this->ConvertToOutputFormat(cmd.c_str(), SHELL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user