summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerators.cxx20
-rw-r--r--Source/CPack/cmCPackGenerators.h12
-rw-r--r--Source/CPack/cmCPackGenericGenerator.cxx118
-rw-r--r--Source/CPack/cmCPackGenericGenerator.h22
-rw-r--r--Source/CPack/cmCPackLog.cxx93
-rw-r--r--Source/CPack/cmCPackLog.h64
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackNSISGenerator.h4
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.h4
-rw-r--r--Source/CPack/cmCPackTGZGenerator.cxx54
-rw-r--r--Source/CPack/cmCPackTGZGenerator.h4
-rw-r--r--Source/CPack/cpack.cxx22
14 files changed, 217 insertions, 216 deletions
diff --git a/Source/CPack/cmCPackGenerators.cxx b/Source/CPack/cmCPackGenerators.cxx
index cf83f20..7713a00 100644
--- a/Source/CPack/cmCPackGenerators.cxx
+++ b/Source/CPack/cmCPackGenerators.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -39,7 +39,7 @@ cmCPackGenerators::cmCPackGenerators()
cmCPackGenerators::~cmCPackGenerators()
{
std::vector<cmCPackGenericGenerator*>::iterator it;
- for ( it = m_Generators.begin(); it != m_Generators.end(); ++ it )
+ for ( it = this->Generators.begin(); it != this->Generators.end(); ++ it )
{
delete *it;
}
@@ -53,8 +53,8 @@ cmCPackGenericGenerator* cmCPackGenerators::NewGenerator(const char* name)
{
return 0;
}
- m_Generators.push_back(gen);
- gen->SetLogger(m_Logger);
+ this->Generators.push_back(gen);
+ gen->SetLogger(this->Logger);
return gen;
}
@@ -67,8 +67,8 @@ cmCPackGenericGenerator* cmCPackGenerators::NewGeneratorInternal(
return 0;
}
cmCPackGenerators::t_GeneratorCreatorsMap::iterator it
- = m_GeneratorCreators.find(name);
- if ( it == m_GeneratorCreators.end() )
+ = this->GeneratorCreators.find(name);
+ if ( it == this->GeneratorCreators.end() )
{
return 0;
}
@@ -81,9 +81,9 @@ void cmCPackGenerators::RegisterGenerator(const char* name,
{
if ( !name || !createGenerator )
{
- cmCPack_Log(m_Logger, cmCPackLog::LOG_ERROR, "Cannot register generator"
- << std::endl);
+ cmCPack_Log(this->Logger, cmCPackLog::LOG_ERROR,
+ "Cannot register generator" << std::endl);
return;
}
- m_GeneratorCreators[name] = createGenerator;
+ this->GeneratorCreators[name] = createGenerator;
}
diff --git a/Source/CPack/cmCPackGenerators.h b/Source/CPack/cmCPackGenerators.h
index efd5a71..d100e9b 100644
--- a/Source/CPack/cmCPackGenerators.h
+++ b/Source/CPack/cmCPackGenerators.h
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -44,15 +44,15 @@ public:
void RegisterGenerator(const char* name,
CreateGeneratorCall* createGenerator);
- void SetLogger(cmCPackLog* logger) { m_Logger = logger; }
+ void SetLogger(cmCPackLog* logger) { this->Logger = logger; }
private:
cmCPackGenericGenerator* NewGeneratorInternal(const char* name);
- std::vector<cmCPackGenericGenerator*> m_Generators;
+ std::vector<cmCPackGenericGenerator*> Generators;
typedef std::map<cmStdString, CreateGeneratorCall*> t_GeneratorCreatorsMap;
- t_GeneratorCreatorsMap m_GeneratorCreators;
- cmCPackLog* m_Logger;
+ t_GeneratorCreatorsMap GeneratorCreators;
+ cmCPackLog* Logger;
};
#endif
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx
index 209c597..4ceea02 100644
--- a/Source/CPack/cmCPackGenericGenerator.cxx
+++ b/Source/CPack/cmCPackGenericGenerator.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -31,21 +31,21 @@
//----------------------------------------------------------------------
cmCPackGenericGenerator::cmCPackGenericGenerator()
{
- m_GeneratorVerbose = false;
- m_MakefileMap = 0;
- m_Logger = 0;
+ this->GeneratorVerbose = false;
+ this->MakefileMap = 0;
+ this->Logger = 0;
}
//----------------------------------------------------------------------
cmCPackGenericGenerator::~cmCPackGenericGenerator()
{
- m_MakefileMap = 0;
+ this->MakefileMap = 0;
}
//----------------------------------------------------------------------
int cmCPackGenericGenerator::PrepareNames()
{
- this->SetOption("CPACK_GENERATOR", m_Name.c_str());
+ this->SetOption("CPACK_GENERATOR", this->Name.c_str());
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
tempDirectory += "/_CPack_Packages/";
tempDirectory += this->GetOption("CPACK_GENERATOR");
@@ -157,7 +157,7 @@ int cmCPackGenericGenerator::InstallProject()
std::string output;
int retVal = 1;
bool resB = cmSystemTools::RunSingleCommand(it->c_str(), &output,
- &retVal, 0, m_GeneratorVerbose, 0);
+ &retVal, 0, this->GeneratorVerbose, 0);
if ( !resB || retVal )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
@@ -272,12 +272,12 @@ void cmCPackGenericGenerator::SetOption(const char* op, const char* value)
}
if ( !value )
{
- m_MakefileMap->RemoveDefinition(op);
+ this->MakefileMap->RemoveDefinition(op);
return;
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, this->GetNameOfClass()
<< "::SetOption(" << op << ", " << value << ")" << std::endl);
- m_MakefileMap->AddDefinition(op, value);
+ this->MakefileMap->AddDefinition(op, value);
}
//----------------------------------------------------------------------
@@ -346,15 +346,15 @@ int cmCPackGenericGenerator::ProcessGenerator()
//----------------------------------------------------------------------
int cmCPackGenericGenerator::Initialize(const char* name, cmMakefile* mf)
{
- m_MakefileMap = mf;
- m_Name = name;
+ this->MakefileMap = mf;
+ this->Name = name;
return 1;
}
//----------------------------------------------------------------------
const char* cmCPackGenericGenerator::GetOption(const char* op)
{
- return m_MakefileMap->GetDefinition(op);
+ return this->MakefileMap->GetDefinition(op);
}
//----------------------------------------------------------------------
@@ -363,18 +363,18 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
int found = 0;
// Find our own executable.
std::vector<cmStdString> failures;
- m_CPackSelf = arg0;
- cmSystemTools::ConvertToUnixSlashes(m_CPackSelf);
- failures.push_back(m_CPackSelf);
- m_CPackSelf = cmSystemTools::FindProgram(m_CPackSelf.c_str());
- if(!cmSystemTools::FileExists(m_CPackSelf.c_str()))
+ this->CPackSelf = arg0;
+ cmSystemTools::ConvertToUnixSlashes(this->CPackSelf);
+ failures.push_back(this->CPackSelf);
+ this->CPackSelf = cmSystemTools::FindProgram(this->CPackSelf.c_str());
+ if(!cmSystemTools::FileExists(this->CPackSelf.c_str()))
{
- failures.push_back(m_CPackSelf);
- m_CPackSelf = "/usr/local/bin/ctest";
+ failures.push_back(this->CPackSelf);
+ this->CPackSelf = "/usr/local/bin/ctest";
}
- if(!cmSystemTools::FileExists(m_CPackSelf.c_str()))
+ if(!cmSystemTools::FileExists(this->CPackSelf.c_str()))
{
- failures.push_back(m_CPackSelf);
+ failures.push_back(this->CPackSelf);
cmOStringStream msg;
msg << "CTEST can not find the command line program ctest.\n";
msg << " argv[0] = \"" << arg0 << "\"\n";
@@ -388,33 +388,33 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
}
std::string dir;
std::string file;
- if(cmSystemTools::SplitProgramPath(m_CPackSelf.c_str(),
+ if(cmSystemTools::SplitProgramPath(this->CPackSelf.c_str(),
dir, file, true))
{
- m_CMakeSelf = dir += "/cmake";
- m_CMakeSelf += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(m_CMakeSelf.c_str()))
+ this->CMakeSelf = dir += "/cmake";
+ this->CMakeSelf += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(this->CMakeSelf.c_str()))
{
found = 1;
}
}
if ( !found )
{
- failures.push_back(m_CMakeSelf);
+ failures.push_back(this->CMakeSelf);
#ifdef CMAKE_BUILD_DIR
std::string intdir = ".";
#ifdef CMAKE_INTDIR
intdir = CMAKE_INTDIR;
#endif
- m_CMakeSelf = CMAKE_BUILD_DIR;
- m_CMakeSelf += "/bin/";
- m_CMakeSelf += intdir;
- m_CMakeSelf += "/cmake";
- m_CMakeSelf += cmSystemTools::GetExecutableExtension();
+ this->CMakeSelf = CMAKE_BUILD_DIR;
+ this->CMakeSelf += "/bin/";
+ this->CMakeSelf += intdir;
+ this->CMakeSelf += "/cmake";
+ this->CMakeSelf += cmSystemTools::GetExecutableExtension();
#endif
- if(!cmSystemTools::FileExists(m_CMakeSelf.c_str()))
+ if(!cmSystemTools::FileExists(this->CMakeSelf.c_str()))
{
- failures.push_back(m_CMakeSelf);
+ failures.push_back(this->CMakeSelf);
cmOStringStream msg;
msg << "CTEST can not find the command line program cmake.\n";
msg << " argv[0] = \"" << arg0 << "\"\n";
@@ -439,14 +439,14 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
if(modules.empty() || !cmSystemTools::FileExists(modules.c_str()))
{
// next try exe/..
- cMakeRoot = cmSystemTools::GetProgramPath(m_CMakeSelf.c_str());
+ cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str());
std::string::size_type slashPos = cMakeRoot.rfind("/");
- if(slashPos != std::string::npos)
+ if(slashPos != std::string::npos)
{
cMakeRoot = cMakeRoot.substr(0, slashPos);
}
// is there no Modules direcory there?
- modules = cMakeRoot + "/Modules/CMake.cmake";
+ modules = cMakeRoot + "/Modules/CMake.cmake";
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: "
<< modules.c_str() << std::endl);
}
@@ -481,8 +481,8 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
#endif
if (!cmSystemTools::FileExists(modules.c_str()))
{
- // try
- cMakeRoot = cmSystemTools::GetProgramPath(m_CMakeSelf.c_str());
+ // try
+ cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str());
cMakeRoot += CMAKE_DATA_DIR;
modules = cMakeRoot + "/Modules/CMake.cmake";
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: "
@@ -491,9 +491,9 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
if(!cmSystemTools::FileExists(modules.c_str()))
{
// next try exe
- cMakeRoot = cmSystemTools::GetProgramPath(m_CMakeSelf.c_str());
+ cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str());
// is there no Modules direcory there?
- modules = cMakeRoot + "/Modules/CMake.cmake";
+ modules = cMakeRoot + "/Modules/CMake.cmake";
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: "
<< modules.c_str() << std::endl);
}
@@ -506,10 +506,10 @@ int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
cMakeRoot.c_str());
return 0;
}
- m_CMakeRoot = cMakeRoot;
+ this->CMakeRoot = cMakeRoot;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: "
- << m_CMakeRoot.c_str() << std::endl);
- this->SetOption("CMAKE_ROOT", m_CMakeRoot.c_str());
+ << this->CMakeRoot.c_str() << std::endl);
+ this->SetOption("CMAKE_ROOT", this->CMakeRoot.c_str());
return 1;
}
@@ -526,34 +526,34 @@ int cmCPackGenericGenerator::CompressFiles(const char* outFileName,
//----------------------------------------------------------------------
const char* cmCPackGenericGenerator::GetInstallPath()
{
- if ( !m_InstallPath.empty() )
+ if ( !this->InstallPath.empty() )
{
- return m_InstallPath.c_str();
+ return this->InstallPath.c_str();
}
#if defined(_WIN32) && !defined(__CYGWIN__)
const char* prgfiles = cmsys::SystemTools::GetEnv("ProgramFiles");
const char* sysDrive = cmsys::SystemTools::GetEnv("SystemDrive");
if ( prgfiles )
{
- m_InstallPath = prgfiles;
+ this->InstallPath = prgfiles;
}
else if ( sysDrive )
{
- m_InstallPath = sysDrive;
- m_InstallPath += "/Program Files";
+ this->InstallPath = sysDrive;
+ this->InstallPath += "/Program Files";
}
- else
+ else
{
- m_InstallPath = "c:/Program Files";
+ this->InstallPath = "c:/Program Files";
}
- m_InstallPath += "/";
- m_InstallPath += this->GetOption("CPACK_PACKAGE_NAME");
- m_InstallPath += "-";
- m_InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
+ this->InstallPath += "/";
+ this->InstallPath += this->GetOption("CPACK_PACKAGE_NAME");
+ this->InstallPath += "-";
+ this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
#else
- m_InstallPath = "/usr/local/";
+ this->InstallPath = "/usr/local/";
#endif
- return m_InstallPath.c_str();
+ return this->InstallPath.c_str();
}
//----------------------------------------------------------------------
@@ -561,7 +561,7 @@ std::string cmCPackGenericGenerator::FindTemplate(const char* name)
{
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
<< name << std::endl);
- std::string ffile = m_MakefileMap->GetModulesFile(name);
+ std::string ffile = this->MakefileMap->GetModulesFile(name);
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: "
<< ffile.c_str() << std::endl);
return ffile;
@@ -571,6 +571,6 @@ std::string cmCPackGenericGenerator::FindTemplate(const char* name)
bool cmCPackGenericGenerator::ConfigureFile(const char* inName,
const char* outName)
{
- return m_MakefileMap->ConfigureFile(inName, outName,
+ return this->MakefileMap->ConfigureFile(inName, outName,
false, true, false) == 1;
}
diff --git a/Source/CPack/cmCPackGenericGenerator.h b/Source/CPack/cmCPackGenericGenerator.h
index 6a4e015..82214a5 100644
--- a/Source/CPack/cmCPackGenericGenerator.h
+++ b/Source/CPack/cmCPackGenericGenerator.h
@@ -29,7 +29,7 @@
do { \
cmOStringStream cmCPackLog_msg; \
cmCPackLog_msg << msg; \
- m_Logger->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str());\
+ this->Logger->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str());\
} while ( 0 )
#ifdef cerr
@@ -56,7 +56,7 @@ public:
/**
* If verbose then more informaiton is printed out
*/
- void SetVerbose(bool val) { m_GeneratorVerbose = val; }
+ void SetVerbose(bool val) { this->GeneratorVerbose = val; }
/**
* Do the actual processing. Subclass has to override it.
@@ -83,7 +83,7 @@ public:
int FindRunningCMake(const char* arg0);
//! Set the logger
- void SetLogger(cmCPackLog* log) { m_Logger = log; }
+ void SetLogger(cmCPackLog* log) { this->Logger = log; }
protected:
int PrepareNames();
@@ -99,19 +99,19 @@ protected:
virtual std::string FindTemplate(const char* name);
virtual bool ConfigureFile(const char* inName, const char* outName);
- bool m_GeneratorVerbose;
- std::string m_Name;
+ bool GeneratorVerbose;
+ std::string Name;
- std::string m_InstallPath;
+ std::string InstallPath;
- std::string m_CPackSelf;
- std::string m_CMakeSelf;
- std::string m_CMakeRoot;
+ std::string CPackSelf;
+ std::string CMakeSelf;
+ std::string CMakeRoot;
- cmCPackLog* m_Logger;
+ cmCPackLog* Logger;
private:
- cmMakefile* m_MakefileMap;
+ cmMakefile* MakefileMap;
};
#endif
diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx
index 180d7df..7b58039 100644
--- a/Source/CPack/cmCPackLog.cxx
+++ b/Source/CPack/cmCPackLog.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -22,19 +22,19 @@
//----------------------------------------------------------------------
cmCPackLog::cmCPackLog()
{
- m_Verbose = false;
- m_Debug = false;
- m_Quiet = false;
- m_NewLine = true;
+ this->Verbose = false;
+ this->Debug = false;
+ this->Quiet = false;
+ this->NewLine = true;
- m_LastTag = cmCPackLog::NOTAG;
+ this->LastTag = cmCPackLog::NOTAG;
#undef cerr
#undef cout
- m_DefaultOutput = &std::cout;
- m_DefaultError = &std::cerr;
-
- m_LogOutput = 0;
- m_LogOutputCleanup = false;
+ this->DefaultOutput = &std::cout;
+ this->DefaultError = &std::cerr;
+
+ this->LogOutput = 0;
+ this->LogOutputCleanup = false;
}
//----------------------------------------------------------------------
@@ -46,12 +46,12 @@ cmCPackLog::~cmCPackLog()
//----------------------------------------------------------------------
void cmCPackLog::SetLogOutputStream(std::ostream* os)
{
- if ( m_LogOutputCleanup && m_LogOutput )
+ if ( this->LogOutputCleanup && this->LogOutput )
{
- delete m_LogOutput;
+ delete this->LogOutput;
}
- m_LogOutputCleanup = false;
- m_LogOutput = os;
+ this->LogOutputCleanup = false;
+ this->LogOutput = os;
}
//----------------------------------------------------------------------
@@ -72,7 +72,7 @@ bool cmCPackLog::SetLogOutputFile(const char* fname)
{
return false;
}
- m_LogOutputCleanup = true;
+ this->LogOutputCleanup = true;
return true;
}
@@ -84,7 +84,7 @@ void cmCPackLog::Log(int tag, const char* file, int line,
bool display = false;
// Display file and line number if debug
- bool useFileAndLine = m_Debug;
+ bool useFileAndLine = this->Debug;
bool output = false;
bool debug = false;
@@ -95,7 +95,7 @@ void cmCPackLog::Log(int tag, const char* file, int line,
// When writing in file, add list of tags whenever tag changes.
std::string tagString;
bool needTagString = false;
- if ( m_LogOutput && m_LastTag != tag )
+ if ( this->LogOutput && this->LastTag != tag )
{
needTagString = true;
}
@@ -130,7 +130,7 @@ void cmCPackLog::Log(int tag, const char* file, int line,
tagString = "ERROR";
}
}
- if ( tag & LOG_DEBUG && m_Debug )
+ if ( tag & LOG_DEBUG && this->Debug )
{
debug = true;
display = true;
@@ -141,7 +141,7 @@ void cmCPackLog::Log(int tag, const char* file, int line,
}
useFileAndLine = true;
}
- if ( tag & LOG_VERBOSE && m_Verbose )
+ if ( tag & LOG_VERBOSE && this->Verbose )
{
verbose = true;
display = true;
@@ -151,73 +151,74 @@ void cmCPackLog::Log(int tag, const char* file, int line,
tagString = "VERBOSE";
}
}
- if ( m_Quiet )
+ if ( this->Quiet )
{
display = false;
}
- if ( m_LogOutput )
+ if ( this->LogOutput )
{
if ( needTagString )
{
- *m_LogOutput << "[" << file << ":" << line << " " << tagString << "] ";
+ *this->LogOutput << "[" << file << ":" << line << " "
+ << tagString << "] ";
}
- m_LogOutput->write(msg, length);
+ this->LogOutput->write(msg, length);
}
- m_LastTag = tag;
+ this->LastTag = tag;
if ( !display )
{
return;
}
- if ( m_NewLine )
+ if ( this->NewLine )
{
- if ( error && !m_ErrorPrefix.empty() )
+ if ( error && !this->ErrorPrefix.empty() )
{
- *m_DefaultError << m_ErrorPrefix.c_str();
+ *this->DefaultError << this->ErrorPrefix.c_str();
}
- else if ( warning && !m_WarningPrefix.empty() )
+ else if ( warning && !this->WarningPrefix.empty() )
{
- *m_DefaultError << m_WarningPrefix.c_str();
+ *this->DefaultError << this->WarningPrefix.c_str();
}
- else if ( output && !m_OutputPrefix.empty() )
+ else if ( output && !this->OutputPrefix.empty() )
{
- *m_DefaultOutput << m_OutputPrefix.c_str();
+ *this->DefaultOutput << this->OutputPrefix.c_str();
}
- else if ( verbose && !m_VerbosePrefix.empty() )
+ else if ( verbose && !this->VerbosePrefix.empty() )
{
- *m_DefaultOutput << m_VerbosePrefix.c_str();
+ *this->DefaultOutput << this->VerbosePrefix.c_str();
}
- else if ( debug && !m_DebugPrefix.empty() )
+ else if ( debug && !this->DebugPrefix.empty() )
{
- *m_DefaultOutput << m_DebugPrefix.c_str();
+ *this->DefaultOutput << this->DebugPrefix.c_str();
}
- else if ( !m_Prefix.empty() )
+ else if ( !this->Prefix.empty() )
{
- *m_DefaultOutput << m_Prefix.c_str();
+ *this->DefaultOutput << this->Prefix.c_str();
}
if ( useFileAndLine )
{
if ( error || warning )
{
- *m_DefaultError << file << ":" << line << " ";
+ *this->DefaultError << file << ":" << line << " ";
}
else
{
- *m_DefaultOutput << file << ":" << line << " ";
+ *this->DefaultOutput << file << ":" << line << " ";
}
}
}
if ( error || warning )
{
- m_DefaultError->write(msg, length);
- m_DefaultError->flush();
+ this->DefaultError->write(msg, length);
+ this->DefaultError->flush();
}
else
{
- m_DefaultOutput->write(msg, length);
- m_DefaultOutput->flush();
+ this->DefaultOutput->write(msg, length);
+ this->DefaultOutput->flush();
}
if ( msg[length-1] == '\n' || length > 2 )
{
- m_NewLine = true;
+ this->NewLine = true;
}
}
diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h
index 3970876..ec18ce7 100644
--- a/Source/CPack/cmCPackLog.h
+++ b/Source/CPack/cmCPackLog.h
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -78,26 +78,26 @@ public:
//! Set Verbose
void VerboseOn() { this->SetVerbose(true); }
void VerboseOff() { this->SetVerbose(true); }
- void SetVerbose(bool verb) { m_Verbose = verb; }
- bool GetVerbose() { return m_Verbose; }
+ void SetVerbose(bool verb) { this->Verbose = verb; }
+ bool GetVerbose() { return this->Verbose; }
//! Set Debug
void DebugOn() { this->SetDebug(true); }
void DebugOff() { this->SetDebug(true); }
- void SetDebug(bool verb) { m_Debug = verb; }
- bool GetDebug() { return m_Debug; }
+ void SetDebug(bool verb) { this->Debug = verb; }
+ bool GetDebug() { return this->Debug; }
//! Set Quiet
void QuietOn() { this->SetQuiet(true); }
void QuietOff() { this->SetQuiet(true); }
- void SetQuiet(bool verb) { m_Quiet = verb; }
- bool GetQuiet() { return m_Quiet; }
+ void SetQuiet(bool verb) { this->Quiet = verb; }
+ bool GetQuiet() { return this->Quiet; }
//! Set the output stream
- void SetOutputStream(std::ostream* os) { m_DefaultOutput = os; }
+ void SetOutputStream(std::ostream* os) { this->DefaultOutput = os; }
//! Set the error stream
- void SetErrorStream(std::ostream* os) { m_DefaultError = os; }
+ void SetErrorStream(std::ostream* os) { this->DefaultError = os; }
//! Set the log output stream
void SetLogOutputStream(std::ostream* os);
@@ -108,36 +108,36 @@ public:
//! Set the various prefixes for the logging. SetPrefix sets the generic
// prefix that overwrittes missing ones.
- void SetPrefix(std::string pfx) { m_Prefix = pfx; }
- void SetOutputPrefix(std::string pfx) { m_OutputPrefix = pfx; }
- void SetVerbosePrefix(std::string pfx) { m_VerbosePrefix = pfx; }
- void SetDebugPrefix(std::string pfx) { m_DebugPrefix = pfx; }
- void SetWarningPrefix(std::string pfx) { m_WarningPrefix = pfx; }
- void SetErrorPrefix(std::string pfx) { m_ErrorPrefix = pfx; }
+ void SetPrefix(std::string pfx) { this->Prefix = pfx; }
+ void SetOutputPrefix(std::string pfx) { this->OutputPrefix = pfx; }
+ void SetVerbosePrefix(std::string pfx) { this->VerbosePrefix = pfx; }
+ void SetDebugPrefix(std::string pfx) { this->DebugPrefix = pfx; }
+ void SetWarningPrefix(std::string pfx) { this->WarningPrefix = pfx; }
+ void SetErrorPrefix(std::string pfx) { this->ErrorPrefix = pfx; }
private:
- bool m_Verbose;
- bool m_Debug;
- bool m_Quiet;
+ bool Verbose;
+ bool Debug;
+ bool Quiet;
- bool m_NewLine;
+ bool NewLine;
- int m_LastTag;
+ int LastTag;
- std::string m_Prefix;
- std::string m_OutputPrefix;
- std::string m_VerbosePrefix;
- std::string m_DebugPrefix;
- std::string m_WarningPrefix;
- std::string m_ErrorPrefix;
+ std::string Prefix;
+ std::string OutputPrefix;
+ std::string VerbosePrefix;
+ std::string DebugPrefix;
+ std::string WarningPrefix;
+ std::string ErrorPrefix;
- std::ostream *m_DefaultOutput;
- std::ostream *m_DefaultError;
+ std::ostream *DefaultOutput;
+ std::ostream *DefaultError;
- std::string m_LogOutputFileName;
- std::ostream *m_LogOutput;
+ std::string LogOutputFileName;
+ std::ostream *LogOutput;
// Do we need to cleanup log output stream
- bool m_LogOutputCleanup;
+ bool LogOutputCleanup;
};
class cmCPackLogWrite
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 8456c5b..6261960 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -99,7 +99,7 @@ int cmCPackNSISGenerator::CompressFiles(const char* outFileName,
std::string output;
int retVal = 1;
bool res = cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output,
- &retVal, 0, m_GeneratorVerbose, 0);
+ &retVal, 0, this->GeneratorVerbose, 0);
if ( !res || retVal )
{
cmGeneratedFileStream ofs(tmpFile.c_str());
@@ -147,7 +147,7 @@ int cmCPackNSISGenerator::Initialize(const char* name, cmMakefile* mf)
std::string output;
int retVal = 1;
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
- &output, &retVal, 0, m_GeneratorVerbose, 0);
+ &output, &retVal, 0, this->GeneratorVerbose, 0);
cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)");
if ( !resS || retVal || !versionRex.find(output))
diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h
index 3d8b2e5..c22f979 100644
--- a/Source/CPack/cmCPackNSISGenerator.h
+++ b/Source/CPack/cmCPackNSISGenerator.h
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 0c2e21a..b5d9951 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -95,7 +95,7 @@ int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName,
std::string output;
int retVal = 1;
//bool res = cmSystemTools::RunSingleCommand(pkgCmd.str().c_str(), &output,
- //&retVal, 0, m_GeneratorVerbose, 0);
+ //&retVal, 0, this->GeneratorVerbose, 0);
bool res = true;
retVal = system(pkgCmd.str().c_str());
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
@@ -120,7 +120,7 @@ int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName,
<< "\" create -ov -format UDZO -srcfolder \"" << packageDirFileName
<< "\" \"" << outFileName << "\"";
res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
- &retVal, 0, m_GeneratorVerbose, 0);
+ &retVal, 0, this->GeneratorVerbose, 0);
if ( !res || retVal )
{
cmGeneratedFileStream ofs(tmpFile.c_str());
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 70deddc..96c4453 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h
index 7be0176..bf7dec8 100644
--- a/Source/CPack/cmCPackSTGZGenerator.h
+++ b/Source/CPack/cmCPackSTGZGenerator.h
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx
index 9c7ea94..4be3d43 100644
--- a/Source/CPack/cmCPackTGZGenerator.cxx
+++ b/Source/CPack/cmCPackTGZGenerator.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -60,13 +60,13 @@ class cmCPackTGZ_Data
public:
cmCPackTGZ_Data(cmCPackTGZGenerator* gen) :
OutputStream(0), Generator(gen),
- m_CompressionLevel(Z_DEFAULT_COMPRESSION) {}
+ CompressionLevel(Z_DEFAULT_COMPRESSION) {}
std::ostream* OutputStream;
cmCPackTGZGenerator* Generator;
- char m_CompressedBuffer[cmCPackTGZ_Data_BlockSize];
- int m_CompressionLevel;
- z_stream m_ZLibStream;
- uLong m_CRC;
+ char CompressedBuffer[cmCPackTGZ_Data_BlockSize];
+ int CompressionLevel;
+ z_stream ZLibStream;
+ uLong CRC;
};
//----------------------------------------------------------------------
@@ -84,11 +84,11 @@ int cmCPackTGZ_Data_Open(void *client_data, const char* pathname,
{
cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data;
- mydata->m_ZLibStream.zalloc = Z_NULL;
- mydata->m_ZLibStream.zfree = Z_NULL;
- mydata->m_ZLibStream.opaque = Z_NULL;
+ mydata->ZLibStream.zalloc = Z_NULL;
+ mydata->ZLibStream.zfree = Z_NULL;
+ mydata->ZLibStream.opaque = Z_NULL;
int strategy = Z_DEFAULT_STRATEGY;
- if ( deflateInit2(&mydata->m_ZLibStream, mydata->m_CompressionLevel,
+ if ( deflateInit2(&mydata->ZLibStream, mydata->CompressionLevel,
Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy) != Z_OK )
{
return -1;
@@ -102,13 +102,13 @@ int cmCPackTGZ_Data_Open(void *client_data, const char* pathname,
{
return -1;
}
-
+
if ( !cmCPackTGZGeneratorForward::GenerateHeader(mydata->Generator,gf))
{
return -1;
}
- mydata->m_CRC = crc32(0L, Z_NULL, 0);
+ mydata->CRC = crc32(0L, Z_NULL, 0);
return 0;
}
@@ -118,27 +118,27 @@ ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n)
{
cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data;
- mydata->m_ZLibStream.avail_in = n;
- mydata->m_ZLibStream.next_in = reinterpret_cast<Bytef*>(buff);
+ mydata->ZLibStream.avail_in = n;
+ mydata->ZLibStream.next_in = reinterpret_cast<Bytef*>(buff);
do {
- mydata->m_ZLibStream.avail_out = cmCPackTGZ_Data_BlockSize;
- mydata->m_ZLibStream.next_out
- = reinterpret_cast<Bytef*>(mydata->m_CompressedBuffer);
+ mydata->ZLibStream.avail_out = cmCPackTGZ_Data_BlockSize;
+ mydata->ZLibStream.next_out
+ = reinterpret_cast<Bytef*>(mydata->CompressedBuffer);
// no bad return value
- int ret = deflate(&mydata->m_ZLibStream, (n?Z_NO_FLUSH:Z_FINISH));
+ int ret = deflate(&mydata->ZLibStream, (n?Z_NO_FLUSH:Z_FINISH));
if(ret == Z_STREAM_ERROR)
{
return 0;
}
size_t compressedSize
- = cmCPackTGZ_Data_BlockSize - mydata->m_ZLibStream.avail_out;
+ = cmCPackTGZ_Data_BlockSize - mydata->ZLibStream.avail_out;
mydata->OutputStream->write(
- reinterpret_cast<const char*>(mydata->m_CompressedBuffer),
+ reinterpret_cast<const char*>(mydata->CompressedBuffer),
compressedSize);
- } while ( mydata->m_ZLibStream.avail_out == 0 );
+ } while ( mydata->ZLibStream.avail_out == 0 );
if ( !*mydata->OutputStream )
{
@@ -146,7 +146,7 @@ ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n)
}
if ( n )
{
- mydata->m_CRC = crc32(mydata->m_CRC, reinterpret_cast<Bytef *>(buff), n);
+ mydata->CRC = crc32(mydata->CRC, reinterpret_cast<Bytef *>(buff), n);
}
return n;
}
@@ -160,19 +160,19 @@ int cmCPackTGZ_Data_Close(void *client_data)
char buffer[8];
int n;
- uLong x = mydata->m_CRC;
+ uLong x = mydata->CRC;
for (n = 0; n < 4; n++) {
buffer[n] = (int)(x & 0xff);
x >>= 8;
}
- x = mydata->m_ZLibStream.total_in;
+ x = mydata->ZLibStream.total_in;
for (n = 0; n < 4; n++) {
buffer[n+4] = (int)(x & 0xff);
x >>= 8;
}
mydata->OutputStream->write(buffer, 8);
- (void)deflateEnd(&mydata->m_ZLibStream);
+ (void)deflateEnd(&mydata->ZLibStream);
delete mydata->OutputStream;
mydata->OutputStream = 0;
return (0);
@@ -204,7 +204,7 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
if (tar_open(&t, realName,
&gztype,
flags, 0644,
- (m_GeneratorVerbose?TAR_VERBOSE:0)
+ (this->GeneratorVerbose?TAR_VERBOSE:0)
| 0) == -1)
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): "
diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h
index d411096..a486a24 100644
--- a/Source/CPack/cmCPackTGZGenerator.h
+++ b/Source/CPack/cmCPackTGZGenerator.h
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index e02aabf..c44959a 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
@@ -105,12 +105,12 @@ int cpackUnknownArgument(const char*, void*)
struct cpackDefinitions
{
typedef std::map<cmStdString, cmStdString> MapType;
- MapType m_Map;
- cmCPackLog *m_Log;
+ MapType Map;
+ cmCPackLog *Log;
};
//----------------------------------------------------------------------------
-int cpackDefinitionArgument(const char* argument, const char* cValue,
+int cpackDefinitionArgument(const char* argument, const char* cValue,
void* call_data)
{
(void)argument;
@@ -119,14 +119,14 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
size_t pos = value.find_first_of("=");
if ( pos == std::string::npos )
{
- cmCPack_Log(def->m_Log, cmCPackLog::LOG_ERROR,
+ cmCPack_Log(def->Log, cmCPackLog::LOG_ERROR,
"Please specify CPack definitions as: KEY=VALUE" << std::endl);
return 0;
}
std::string key = value.substr(0, pos);
value = value.c_str() + pos + 1;
- def->m_Map[key] = value;
- cmCPack_Log(def->m_Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
+ def->Map[key] = value;
+ cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
<< key.c_str() << " to \"" << value.c_str() << "\"" << std::endl);
return 1;
}
@@ -168,7 +168,7 @@ int main (int argc, char *argv[])
std::string cpackConfigFile;
cpackDefinitions definitions;
- definitions.m_Log = &log;
+ definitions.Log = &log;
cpackConfigFile = "";
@@ -296,8 +296,8 @@ int main (int argc, char *argv[])
mf->AddDefinition("CPACK_BUILD_CONFIG", cpackBuildConfig.c_str());
}
cpackDefinitions::MapType::iterator cdit;
- for ( cdit = definitions.m_Map.begin();
- cdit != definitions.m_Map.end();
+ for ( cdit = definitions.Map.begin();
+ cdit != definitions.Map.end();
++cdit )
{
mf->AddDefinition(cdit->first.c_str(), cdit->second.c_str());