summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-15 18:32:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-15 18:32:52 (GMT)
commit601af8f2b42400dcbcb8e90af867fa9fa3a0fb97 (patch)
tree9e31a3b929550321791d183e1744edf84f3460da /Source
parentf11b8342a0cae42b42e47428e34577f266fd314c (diff)
parent22f38c0d6b482e99bb793f64c7701259dcf00bd7 (diff)
downloadCMake-601af8f2b42400dcbcb8e90af867fa9fa3a0fb97.zip
CMake-601af8f2b42400dcbcb8e90af867fa9fa3a0fb97.tar.gz
CMake-601af8f2b42400dcbcb8e90af867fa9fa3a0fb97.tar.bz2
Merge topic 'avoid-getcwd'
22f38c0d6b cmake: avoid getcwd in `CollapseFullPath` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4218
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx3
-rw-r--r--Source/cmAddSubDirectoryCommand.cxx3
-rw-r--r--Source/cmCustomCommandGenerator.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmSourceFileLocation.cxx3
5 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 995088c..5deba8b 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -215,7 +215,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
}
if (cmSystemTools::FileIsFullPath(filename)) {
- filename = cmSystemTools::CollapseFullPath(filename);
+ filename = cmSystemTools::CollapseFullPath(
+ filename, status.GetMakefile().GetHomeOutputDirectory());
}
switch (doing) {
case doing_depfile:
diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx
index 6a1a514..35eabaf 100644
--- a/Source/cmAddSubDirectoryCommand.cxx
+++ b/Source/cmAddSubDirectoryCommand.cxx
@@ -53,7 +53,8 @@ bool cmAddSubDirectoryCommand(std::vector<std::string> const& args,
status.SetError(error);
return false;
}
- srcPath = cmSystemTools::CollapseFullPath(srcPath);
+ srcPath =
+ cmSystemTools::CollapseFullPath(srcPath, mf.GetHomeOutputDirectory());
// Compute the full path to the binary directory.
std::string binPath;
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index c568253..a595007 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -34,7 +34,8 @@ void AppendPaths(const std::vector<std::string>& inputs,
it = cmStrCat(lg->GetMakefile()->GetCurrentBinaryDirectory(), '/', it);
}
if (cmSystemTools::FileIsFullPath(it)) {
- it = cmSystemTools::CollapseFullPath(it);
+ it = cmSystemTools::CollapseFullPath(
+ it, lg->GetMakefile()->GetHomeOutputDirectory());
}
}
cm::append(output, result);
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 523083a..b3fb132 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3086,7 +3086,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories(
cmLinkImplementationLibraries const* impl =
this->GetLinkImplementationLibraries(config);
for (cmLinkImplItem const& lib : impl->Libraries) {
- std::string libDir = cmSystemTools::CollapseFullPath(lib.AsStr());
+ std::string libDir = cmSystemTools::CollapseFullPath(
+ lib.AsStr(), this->Makefile->GetHomeOutputDirectory());
static cmsys::RegularExpression frameworkCheck(
"(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index df702b0..5f807b8 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -31,7 +31,8 @@ cmSourceFileLocation::cmSourceFileLocation(cmMakefile const* mf,
this->AmbiguousExtension = true;
this->Directory = cmSystemTools::GetFilenamePath(name);
if (cmSystemTools::FileIsFullPath(this->Directory)) {
- this->Directory = cmSystemTools::CollapseFullPath(this->Directory);
+ this->Directory = cmSystemTools::CollapseFullPath(
+ this->Directory, mf->GetHomeOutputDirectory());
}
this->Name = cmSystemTools::GetFilenameName(name);
if (kind == cmSourceFileLocationKind::Known) {