summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx14
-rw-r--r--Source/CPack/cmCPackGenerator.h10
2 files changed, 10 insertions, 14 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index e1dd4e9..b46fd86 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -972,7 +972,7 @@ bool cmCPackGenerator::ReadListFile(const char* moduleName)
}
//----------------------------------------------------------------------
-void cmCPackGenerator::SetOptionIfNotSet(const char* op,
+void cmCPackGenerator::SetOptionIfNotSet(const std::string& op,
const char* value)
{
const char* def = this->MakefileMap->GetDefinition(op);
@@ -984,12 +984,8 @@ void cmCPackGenerator::SetOptionIfNotSet(const char* op,
}
//----------------------------------------------------------------------
-void cmCPackGenerator::SetOption(const char* op, const char* value)
+void cmCPackGenerator::SetOption(const std::string& op, const char* value)
{
- if ( !op )
- {
- return;
- }
if ( !value )
{
this->MakefileMap->RemoveDefinition(op);
@@ -1176,19 +1172,19 @@ int cmCPackGenerator::InitializeInternal()
}
//----------------------------------------------------------------------
-bool cmCPackGenerator::IsSet(const char* name) const
+bool cmCPackGenerator::IsSet(const std::string& name) const
{
return this->MakefileMap->IsSet(name);
}
//----------------------------------------------------------------------
-bool cmCPackGenerator::IsOn(const char* name) const
+bool cmCPackGenerator::IsOn(const std::string& name) const
{
return cmSystemTools::IsOn(GetOption(name));
}
//----------------------------------------------------------------------
-const char* cmCPackGenerator::GetOption(const char* op) const
+const char* cmCPackGenerator::GetOption(const std::string& op) const
{
const char* ret = this->MakefileMap->GetDefinition(op);
if(!ret)
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index b1a7840..39ef64d 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -99,12 +99,12 @@ public:
virtual ~cmCPackGenerator();
//! Set and get the options
- void SetOption(const char* op, const char* value);
- void SetOptionIfNotSet(const char* op, const char* value);
- const char* GetOption(const char* op) const;
+ void SetOption(const std::string& op, const char* value);
+ void SetOptionIfNotSet(const std::string& op, const char* value);
+ const char* GetOption(const std::string& op) const;
std::vector<std::string> GetOptions() const;
- bool IsSet(const char* name) const;
- bool IsOn(const char* name) const;
+ bool IsSet(const std::string& name) const;
+ bool IsOn(const std::string& name) const;
//! Set the logger
void SetLogger(cmCPackLog* log) { this->Logger = log; }