summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratedFileStream.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-01-02 12:52:54 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-01-02 12:52:54 (GMT)
commitb7ba65ed684a663be0085ae96dca3768ebdd3325 (patch)
treead4f4c9c3653f275e851cc838b77aa9b82ea2a9e /Source/cmGeneratedFileStream.cxx
parentf379128fa3264c41594381e910f8d5c6b2afefea (diff)
downloadCMake-b7ba65ed684a663be0085ae96dca3768ebdd3325.zip
CMake-b7ba65ed684a663be0085ae96dca3768ebdd3325.tar.gz
CMake-b7ba65ed684a663be0085ae96dca3768ebdd3325.tar.bz2
ENH: Add a way to overwrite compression extension
Diffstat (limited to 'Source/cmGeneratedFileStream.cxx')
-rw-r--r--Source/cmGeneratedFileStream.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index d0f2cc0..63a0384 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -108,12 +108,19 @@ void cmGeneratedFileStream::SetCompression(bool compression)
}
//----------------------------------------------------------------------------
+void cmGeneratedFileStream::SetCompressionExtraExtension(bool ext)
+{
+ m_CompressExtraExtension = ext;
+}
+
+//----------------------------------------------------------------------------
cmGeneratedFileStreamBase::cmGeneratedFileStreamBase():
m_Name(),
m_TempName(),
m_CopyIfDifferent(false),
m_Okay(false),
- m_Compress(false)
+ m_Compress(false),
+ m_CompressExtraExtension(true)
{
}
@@ -123,7 +130,8 @@ cmGeneratedFileStreamBase::cmGeneratedFileStreamBase(const char* name):
m_TempName(),
m_CopyIfDifferent(false),
m_Okay(false),
- m_Compress(false)
+ m_Compress(false),
+ m_CompressExtraExtension(true)
{
this->Open(name);
}
@@ -155,7 +163,7 @@ void cmGeneratedFileStreamBase::Open(const char* name)
void cmGeneratedFileStreamBase::Close()
{
std::string resname = m_Name;
- if ( m_Compress )
+ if ( m_CompressExtraExtension )
{
resname += ".gz";
}