summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-13 22:13:09 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-13 22:13:09 (GMT)
commitb59dd02911bfc81d6cb4f4ea181a9dfe34c6bc8e (patch)
tree8de72c99feae30c89b9333c7bf5614db769c9a83 /Source
parent8d150e0bfb13147823a4d0c5aceda21d42a20d6c (diff)
downloadCMake-b59dd02911bfc81d6cb4f4ea181a9dfe34c6bc8e.zip
CMake-b59dd02911bfc81d6cb4f4ea181a9dfe34c6bc8e.tar.gz
CMake-b59dd02911bfc81d6cb4f4ea181a9dfe34c6bc8e.tar.bz2
ENH: For sanity, create directory before creating generated file stream
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratedFileStream.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index 8aa51f7..d70bc5c 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -146,6 +146,9 @@ void cmGeneratedFileStreamBase::Open(const char* name)
// Make sure the temporary file that will be used is not present.
cmSystemTools::RemoveFile(m_TempName.c_str());
+
+ std::string dir = cmSystemTools::GetFilenamePath(m_TempName);
+ cmSystemTools::MakeDirectory(dir.c_str());
}
//----------------------------------------------------------------------------