diff options
author | Brad King <brad.king@kitware.com> | 2004-11-03 12:23:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-11-03 12:23:18 (GMT) |
commit | d46d8df0edfcfac46390319db8213601a5cd4260 (patch) | |
tree | 86f2c559e3983463981ea30e59fa25193207dfb2 /Source/cmLocalGenerator.cxx | |
parent | 3050e231b35c7b8b3e1dfcc37275dddb3b5d7445 (diff) | |
download | CMake-d46d8df0edfcfac46390319db8213601a5cd4260.zip CMake-d46d8df0edfcfac46390319db8213601a5cd4260.tar.gz CMake-d46d8df0edfcfac46390319db8213601a5cd4260.tar.bz2 |
ENH: Re-implemented cmGeneratedFileStream to look like a real stream and replace the destination file atomically. This will avoid problems with the process being terminated while generating a file.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6e58e9c..033ca6d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -92,8 +92,7 @@ void cmLocalGenerator::GenerateInstallRules() toplevel_install = 1; } file += "/cmake_install.cmake"; - cmGeneratedFileStream tempFile(file.c_str()); - std::ostream& fout = tempFile.GetStream(); + cmGeneratedFileStream fout(file.c_str(), true); fout << "# Install script for directory: " << m_Makefile->GetCurrentDirectory() << std::endl << std::endl; |