Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
b7ba65ed
Commit
b7ba65ed
authored
19 years ago
by
Andy Cedilnik
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Add a way to overwrite compression extension
parent
f379128f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/cmGeneratedFileStream.cxx
+11
-3
11 additions, 3 deletions
Source/cmGeneratedFileStream.cxx
Source/cmGeneratedFileStream.h
+8
-0
8 additions, 0 deletions
Source/cmGeneratedFileStream.h
with
19 additions
and
3 deletions
Source/cmGeneratedFileStream.cxx
+
11
−
3
View file @
b7ba65ed
...
...
@@ -107,13 +107,20 @@ void cmGeneratedFileStream::SetCompression(bool compression)
m_Compress
=
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_Compress
ExtraExtension
)
{
resname
+=
".gz"
;
}
...
...
This diff is collapsed.
Click to expand it.
Source/cmGeneratedFileStream.h
+
8
−
0
View file @
b7ba65ed
...
...
@@ -66,6 +66,9 @@ protected:
// Whether the destionation file is compressed
bool
m_Compress
;
// Whether the destionation file is compressed
bool
m_CompressExtraExtension
;
};
/** \class cmGeneratedFileStream
...
...
@@ -131,6 +134,11 @@ public:
*/
void
SetCompression
(
bool
compression
);
/**
* Set whether compression has extra extension
*/
void
SetCompressionExtraExtension
(
bool
ext
);
/**
* Set name of the file that will hold the actual output. This method allows
* the output file to be changed during the use of cmGeneratedFileStream.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment