summaryrefslogtreecommitdiffstats
path: root/Source/cmCableData.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-03-16 16:04:35 (GMT)
committerBrad King <brad.king@kitware.com>2001-03-16 16:04:35 (GMT)
commit2d26d0be684b15e4f0a664093b45201cda665010 (patch)
treed0662ffb35c7969c48f7e0dfca3e94dbed1eda9a /Source/cmCableData.cxx
parentdf8a7ecafdd8a52b816a22df374744e9667e34c5 (diff)
downloadCMake-2d26d0be684b15e4f0a664093b45201cda665010.zip
CMake-2d26d0be684b15e4f0a664093b45201cda665010.tar.gz
CMake-2d26d0be684b15e4f0a664093b45201cda665010.tar.bz2
BUG: Rearranged cable config file open to do open in construction of m_OutputFile. Fixes problem on SGI with opening the file.
Diffstat (limited to 'Source/cmCableData.cxx')
-rw-r--r--Source/cmCableData.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmCableData.cxx b/Source/cmCableData.cxx
index 618a708..ca9eda0 100644
--- a/Source/cmCableData.cxx
+++ b/Source/cmCableData.cxx
@@ -28,9 +28,11 @@ cmCableData::cmCableData(const cmCableCommand* owner,
m_Indentation(0),
m_Package(NULL),
m_PackageNamespaceDepth(0),
- m_PackageClassIndex(-1)
+ m_PackageClassIndex(-1),
+ m_OutputFileName(configurationFile),
+ m_OutputFile(m_OutputFileName.c_str())
{
- this->OpenOutputFile(configurationFile);
+ this->InitializeOutputFile();
}
@@ -48,20 +50,18 @@ cmCableData::~cmCableData()
/**
- * Open the configuration output file with the given name. This
- * writes the configuration header.
+ * Write the configuration header to the output file.
*/
-void cmCableData::OpenOutputFile(const std::string& name)
+void cmCableData::InitializeOutputFile()
{
- m_OutputFile.open(name.c_str());
-
if(m_OutputFile)
{
this->WriteConfigurationHeader();
}
else
{
- cmSystemTools::Error("Unable to open CABLE config file: ", name.c_str());
+ cmSystemTools::Error("Unable to open CABLE config file: ",
+ m_OutputFileName.c_str());
}
}