diff options
author | Martin Duffy <martin.duffy@kitware.com> | 2022-07-29 21:43:11 (GMT) |
---|---|---|
committer | Martin Duffy <martin.duffy@kitware.com> | 2022-08-01 14:23:55 (GMT) |
commit | b02ef99fea16eabc2471e8f3388d90f4c912690e (patch) | |
tree | 5a3deab9afe9f1c6b58a1104f8c34fee9b29fb2d /Source/cmGeneratedFileStream.cxx | |
parent | 514804c8bcfd26a675dcaceaa719a632a21894b2 (diff) | |
download | CMake-b02ef99fea16eabc2471e8f3388d90f4c912690e.zip CMake-b02ef99fea16eabc2471e8f3388d90f4c912690e.tar.gz CMake-b02ef99fea16eabc2471e8f3388d90f4c912690e.tar.bz2 |
cmGeneratedFileStream: Use absolute paths
Use absolute paths in cmGeneratedFileStream to ensure output can be found
if the working directory changes.
Fixes: #23784
Diffstat (limited to 'Source/cmGeneratedFileStream.cxx')
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index b529b8f..6212bbd 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -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) |