|
@@ -286,7 +286,7 @@ cmDocumentationEntry cmake::CMAKE_STANDARD_OPTIONS_TABLE[18] = {
|
|
|
};
|
|
|
|
|
|
cmake::cmake(Role role, cmState::Mode mode, cmState::ProjectKind projectKind)
|
|
|
- : CMakeWorkingDirectory(cmSystemTools::GetCurrentWorkingDirectory())
|
|
|
+ : CMakeWorkingDirectory(cmSystemTools::GetLogicalWorkingDirectory())
|
|
|
, FileTimeCache(cm::make_unique<cmFileTimeCache>())
|
|
|
#ifndef CMAKE_BOOTSTRAP
|
|
|
, VariableWatch(cm::make_unique<cmVariableWatch>())
|
|
@@ -637,8 +637,8 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
|
|
|
// Documented behavior of CMAKE{,_CURRENT}_{SOURCE,BINARY}_DIR is to be
|
|
|
// set to $PWD for -P mode.
|
|
|
state->SetWorkingMode(SCRIPT_MODE);
|
|
|
- state->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
- state->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ state->SetHomeDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
+ state->SetHomeOutputDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
state->ReadListFile(args, path);
|
|
|
return true;
|
|
|
};
|
|
@@ -792,16 +792,16 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
|
|
|
|
|
|
bool cmake::FindPackage(const std::vector<std::string>& args)
|
|
|
{
|
|
|
- this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
- this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ this->SetHomeDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
+ this->SetHomeOutputDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
|
|
|
this->SetGlobalGenerator(cm::make_unique<cmGlobalGenerator>(this));
|
|
|
|
|
|
cmStateSnapshot snapshot = this->GetCurrentSnapshot();
|
|
|
snapshot.GetDirectory().SetCurrentBinary(
|
|
|
- cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
snapshot.GetDirectory().SetCurrentSource(
|
|
|
- cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
// read in the list file to fill the cache
|
|
|
snapshot.SetDefaultDefinitions();
|
|
|
auto mfu = cm::make_unique<cmMakefile>(this->GetGlobalGenerator(), snapshot);
|
|
@@ -1471,10 +1471,10 @@ void cmake::SetArgs(const std::vector<std::string>& args)
|
|
|
}
|
|
|
|
|
|
if (!haveSourceDir) {
|
|
|
- this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ this->SetHomeDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
}
|
|
|
if (!haveBinaryDir) {
|
|
|
- this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ this->SetHomeOutputDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
}
|
|
|
|
|
|
#if !defined(CMAKE_BOOTSTRAP)
|
|
@@ -1839,12 +1839,12 @@ bool cmake::SetDirectoriesFromFile(const std::string& arg)
|
|
|
this->SetHomeDirectoryViaCommandLine(listPath);
|
|
|
if (no_build_tree) {
|
|
|
this->SetHomeOutputDirectory(
|
|
|
- cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
}
|
|
|
} else if (no_source_tree && no_build_tree) {
|
|
|
this->SetHomeDirectory(listPath);
|
|
|
this->SetHomeOutputDirectory(
|
|
|
- cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
} else if (no_build_tree) {
|
|
|
this->SetHomeOutputDirectory(listPath);
|
|
|
}
|
|
@@ -1861,7 +1861,7 @@ bool cmake::SetDirectoriesFromFile(const std::string& arg)
|
|
|
// We didn't find a CMakeCache.txt and it wasn't specified
|
|
|
// with -B. Assume the current working directory as the build tree.
|
|
|
this->SetHomeOutputDirectory(
|
|
|
- cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
used_provided_path = false;
|
|
|
}
|
|
|
}
|
|
@@ -3468,7 +3468,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
|
|
|
{
|
|
|
// so create the directory
|
|
|
std::string resultFile;
|
|
|
- std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
|
|
+ std::string cwd = cmSystemTools::GetLogicalWorkingDirectory();
|
|
|
std::string destPath = cwd + "/__cmake_systeminformation";
|
|
|
cmSystemTools::RemoveADirectory(destPath);
|
|
|
if (!cmSystemTools::MakeDirectory(destPath)) {
|
|
@@ -3606,8 +3606,8 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
|
|
|
|
|
|
#if !defined(CMAKE_BOOTSTRAP)
|
|
|
if (!presetName.empty() || listPresets) {
|
|
|
- this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
- this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ this->SetHomeDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
+ this->SetHomeOutputDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
|
|
|
cmCMakePresetsGraph settingsFile;
|
|
|
auto result = settingsFile.ReadProjectPresets(this->GetHomeDirectory());
|
|
@@ -3952,8 +3952,8 @@ int cmake::Workflow(const std::string& presetName,
|
|
|
WorkflowListPresets listPresets, WorkflowFresh fresh)
|
|
|
{
|
|
|
#ifndef CMAKE_BOOTSTRAP
|
|
|
- this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
- this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
+ this->SetHomeDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
+ this->SetHomeOutputDirectory(cmSystemTools::GetLogicalWorkingDirectory());
|
|
|
|
|
|
cmCMakePresetsGraph settingsFile;
|
|
|
auto result = settingsFile.ReadProjectPresets(this->GetHomeDirectory());
|