summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx3
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx13
-rw-r--r--Source/cmOutputConverter.cxx11
-rw-r--r--Source/cmOutputConverter.h4
-rw-r--r--Source/cmcmd.cxx6
5 files changed, 15 insertions, 22 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 4245037..bbc9c54 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -2495,8 +2495,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
snapshot.GetDirectory().SetCurrentBinary(dir_cur_bld);
auto mfd = cm::make_unique<cmMakefile>(this, snapshot);
auto lgd = this->CreateLocalGenerator(mfd.get());
- lgd->SetRelativePathTopSource(dir_top_src);
- lgd->SetRelativePathTopBinary(dir_top_bld);
+ lgd->SetRelativePathTop(dir_top_src, dir_top_bld);
this->Makefiles.push_back(std::move(mfd));
this->LocalGenerators.push_back(std::move(lgd));
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index e123cf9..7c4af7d 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1508,13 +1508,12 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
}
// Setup relative path top directories.
- if (cmValue relativePathTopSource =
- mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE")) {
- this->SetRelativePathTopSource(*relativePathTopSource);
- }
- if (cmValue relativePathTopBinary =
- mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY")) {
- this->SetRelativePathTopBinary(*relativePathTopBinary);
+ cmValue relativePathTopSource =
+ mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE");
+ cmValue relativePathTopBinary =
+ mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY");
+ if (relativePathTopSource && relativePathTopBinary) {
+ this->SetRelativePathTop(*relativePathTopSource, *relativePathTopBinary);
}
} else {
cmSystemTools::Error("Directory Information file not found");
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index b143170..3d61743 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -79,14 +79,11 @@ std::string const& cmOutputConverter::GetRelativePathTopBinary() const
return this->RelativePathTopBinary;
}
-void cmOutputConverter::SetRelativePathTopSource(std::string const& top)
+void cmOutputConverter::SetRelativePathTop(std::string const& topSource,
+ std::string const& topBinary)
{
- this->RelativePathTopSource = top;
-}
-
-void cmOutputConverter::SetRelativePathTopBinary(std::string const& top)
-{
- this->RelativePathTopBinary = top;
+ this->RelativePathTopSource = topSource;
+ this->RelativePathTopBinary = topBinary;
}
std::string cmOutputConverter::MaybeRelativeTo(
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 335442d..290809f 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -29,8 +29,8 @@ public:
std::string const& GetRelativePathTopSource() const;
std::string const& GetRelativePathTopBinary() const;
- void SetRelativePathTopSource(std::string const& top);
- void SetRelativePathTopBinary(std::string const& top);
+ void SetRelativePathTop(std::string const& topSource,
+ std::string const& topBinary);
enum OutputFormat
{
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index ba61a83..f1c1bdc 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1286,8 +1286,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
// FIXME: With advanced add_subdirectory usage, these are
// not necessarily the same as the generator originally used.
// We should pass all these directories through an info file.
- lgd->SetRelativePathTopSource(homeDir);
- lgd->SetRelativePathTopBinary(homeOutDir);
+ lgd->SetRelativePathTop(homeDir, homeOutDir);
// Actually scan dependencies.
return lgd->UpdateDependencies(depInfo, verbose, color) ? 0 : 2;
@@ -1569,8 +1568,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
// FIXME: With advanced add_subdirectory usage, these are
// not necessarily the same as the generator originally used.
// We should pass all these directories through an info file.
- lgd->SetRelativePathTopSource(homeDir);
- lgd->SetRelativePathTopBinary(homeOutDir);
+ lgd->SetRelativePathTop(homeDir, homeOutDir);
return cmTransformDepfile(format, *lgd, args[8], args[9]) ? 0 : 2;
}