mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
cmGeneratedFileStream: Use absolute paths
Use absolute paths in cmGeneratedFileStream to ensure output can be found if the working directory changes. Fixes: #23784
This commit is contained in:
@@ -124,10 +124,10 @@ cmGeneratedFileStreamBase::~cmGeneratedFileStreamBase()
|
||||
void cmGeneratedFileStreamBase::Open(std::string const& name)
|
||||
{
|
||||
// Save the original name of the file.
|
||||
this->Name = name;
|
||||
this->Name = cmSystemTools::CollapseFullPath(name);
|
||||
|
||||
// Create the name of the temporary file.
|
||||
this->TempName = name;
|
||||
this->TempName = this->Name;
|
||||
#if defined(__VMS)
|
||||
this->TempName += "_";
|
||||
#else
|
||||
@@ -231,7 +231,7 @@ int cmGeneratedFileStreamBase::RenameFile(std::string const& oldname,
|
||||
|
||||
void cmGeneratedFileStream::SetName(const std::string& fname)
|
||||
{
|
||||
this->Name = fname;
|
||||
this->Name = cmSystemTools::CollapseFullPath(fname);
|
||||
}
|
||||
|
||||
void cmGeneratedFileStream::SetTempExt(std::string const& ext)
|
||||
|
||||
Reference in New Issue
Block a user