summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-12 19:26:12 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-12 19:53:37 (GMT)
commitba7b939831428e51042ba98ea54df8b98a20ab27 (patch)
tree2ccc1cebe0f61e29d5b469599b2f88e14ec75c02
parent09bee3bee137af72f57ee10327e4e5f689ce7e90 (diff)
downloadCMake-ba7b939831428e51042ba98ea54df8b98a20ab27.zip
CMake-ba7b939831428e51042ba98ea54df8b98a20ab27.tar.gz
CMake-ba7b939831428e51042ba98ea54df8b98a20ab27.tar.bz2
cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained
The "Not" in the method name is backward from its logic.
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmListFileCache.cxx4
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmStateDirectory.cxx2
-rw-r--r--Source/cmStateDirectory.h2
-rw-r--r--Source/cmTarget.cxx2
7 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1357974..cca3bdc 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -3029,7 +3029,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
// Shorten the output name (in expected use case).
cmStateDirectory cmDir =
this->GetMakefiles()[0]->GetStateSnapshot().GetDirectory();
- std::string fname = cmDir.ConvertToRelPathIfNotContained(
+ std::string fname = cmDir.ConvertToRelPathIfContained(
this->GetMakefiles()[0]->GetState()->GetBinaryDirectory(), outputs[0]);
// Associate the hash with this output.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 248abff..e28baf3 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -610,7 +610,7 @@ cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
tname += "/fast";
}
tname =
- mf->GetStateSnapshot().GetDirectory().ConvertToRelPathIfNotContained(
+ mf->GetStateSnapshot().GetDirectory().ConvertToRelPathIfContained(
mf->GetState()->GetBinaryDirectory(), tname);
cmSystemTools::ConvertToOutputSlashes(tname);
makeCommand.Add(std::move(tname));
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 5c3a034..2b98f20 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -550,7 +550,7 @@ void cmListFileBacktrace::PrintTitle(std::ostream& out) const
cmListFileContext lfc = this->TopEntry->Context;
cmStateSnapshot bottom = this->GetBottom();
if (!bottom.GetState()->GetIsInTryCompile()) {
- lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfNotContained(
+ lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfContained(
bottom.GetState()->GetSourceDirectory(), lfc.FilePath);
}
out << (lfc.Line ? " at " : " in ") << lfc;
@@ -581,7 +581,7 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const
}
cmListFileContext lfc = cur->Context;
if (!bottom.GetState()->GetIsInTryCompile()) {
- lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfNotContained(
+ lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfContained(
bottom.GetState()->GetSourceDirectory(), lfc.FilePath);
}
out << " " << lfc << "\n";
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fbbdfca..304b607 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3676,7 +3676,7 @@ std::string const& cmLocalGenerator::GetCurrentSourceDirectory() const
std::string cmLocalGenerator::MaybeConvertToRelativePath(
std::string const& local_path, std::string const& remote_path) const
{
- return this->StateSnapshot.GetDirectory().ConvertToRelPathIfNotContained(
+ return this->StateSnapshot.GetDirectory().ConvertToRelPathIfContained(
local_path, remote_path);
}
diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx
index 7ce362a..7f25b4b 100644
--- a/Source/cmStateDirectory.cxx
+++ b/Source/cmStateDirectory.cxx
@@ -159,7 +159,7 @@ bool cmStateDirectory::ContainsBoth(std::string const& local_path,
return bothInBinary || bothInSource;
}
-std::string cmStateDirectory::ConvertToRelPathIfNotContained(
+std::string cmStateDirectory::ConvertToRelPathIfContained(
std::string const& local_path, std::string const& remote_path) const
{
if (!this->ContainsBoth(local_path, remote_path)) {
diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h
index 70c19bc..4dab9ff 100644
--- a/Source/cmStateDirectory.h
+++ b/Source/cmStateDirectory.h
@@ -36,7 +36,7 @@ public:
bool ContainsBoth(std::string const& local_path,
std::string const& remote_path) const;
- std::string ConvertToRelPathIfNotContained(
+ std::string ConvertToRelPathIfContained(
std::string const& local_path, std::string const& remote_path) const;
cmStringRange GetIncludeDirectoriesEntries() const;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 91dcd0e..f84d246 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -934,7 +934,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const
for (auto const& cmd : this->impl->TLLCommands) {
if (cmd.first == sig) {
cmListFileContext lfc = cmd.second;
- lfc.FilePath = cmDir.ConvertToRelPathIfNotContained(
+ lfc.FilePath = cmDir.ConvertToRelPathIfContained(
this->impl->Makefile->GetState()->GetSourceDirectory(), lfc.FilePath);
s << " * " << lfc << '\n';
}