summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-10 04:09:05 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:37 (GMT)
commit3def29da3c16ad3a72f05ea8b97ee728e6e3581e (patch)
treedd51569f6c5d8f6f8e35518f7fbc94054552d9a4 /Source
parentacb116e3b52362b41988aa27eeb593dd2e7194c0 (diff)
downloadCMake-3def29da3c16ad3a72f05ea8b97ee728e6e3581e.zip
CMake-3def29da3c16ad3a72f05ea8b97ee728e6e3581e.tar.gz
CMake-3def29da3c16ad3a72f05ea8b97ee728e6e3581e.tar.bz2
stringapi: Use strings for feature arguments
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmMakefile.h3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx4
-rw-r--r--Source/cmMakefileTargetGenerator.h4
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaTargetGenerator.h4
-rw-r--r--Source/cmTarget.cxx2
-rw-r--r--Source/cmTarget.h2
8 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1ef4d46..bb88bc4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3801,7 +3801,7 @@ bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
}
//----------------------------------------------------------------------------
-const char* cmMakefile::GetFeature(const char* feature,
+const char* cmMakefile::GetFeature(const std::string& feature,
const std::string& config)
{
// TODO: Define accumulation policy for features (prepend, append, replace).
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 1c3ad73..7c82ec2 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -811,7 +811,8 @@ public:
cmProperty::ScopeType scope) const;
bool GetPropertyAsBool(const std::string& prop) const;
- const char* GetFeature(const char* feature, const std::string& config);
+ const char* GetFeature(const std::string& feature,
+ const std::string& config);
// Get the properties
cmPropertyMap &GetProperties() { return this->Properties; };
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 1af5d6c..f0c9a3f 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -2105,13 +2105,13 @@ void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags)
}
//----------------------------------------------------------------------------
-const char* cmMakefileTargetGenerator::GetFeature(const char* feature)
+const char* cmMakefileTargetGenerator::GetFeature(const std::string& feature)
{
return this->Target->GetFeature(feature, this->ConfigName);
}
//----------------------------------------------------------------------------
-bool cmMakefileTargetGenerator::GetFeatureAsBool(const char* feature)
+bool cmMakefileTargetGenerator::GetFeatureAsBool(const std::string& feature)
{
return cmSystemTools::IsOn(this->GetFeature(feature));
}
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 21eece4..573ce22 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -263,8 +263,8 @@ protected:
void AddFeatureFlags(std::string& flags, const std::string& lang);
// Feature query methods.
- const char* GetFeature(const char* feature);
- bool GetFeatureAsBool(const char* feature);
+ const char* GetFeature(const std::string& feature);
+ bool GetFeatureAsBool(const std::string& feature);
//==================================================================
// Convenience routines that do nothing more than forward to
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 78ff4e4..3ef236a 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -97,13 +97,13 @@ std::string const& cmNinjaTargetGenerator::GetConfigName() const
}
// TODO: Picked up from cmMakefileTargetGenerator. Refactor it.
-const char* cmNinjaTargetGenerator::GetFeature(const char* feature)
+const char* cmNinjaTargetGenerator::GetFeature(const std::string& feature)
{
return this->Target->GetFeature(feature, this->GetConfigName());
}
// TODO: Picked up from cmMakefileTargetGenerator. Refactor it.
-bool cmNinjaTargetGenerator::GetFeatureAsBool(const char* feature)
+bool cmNinjaTargetGenerator::GetFeatureAsBool(const std::string& feature)
{
return cmSystemTools::IsOn(this->GetFeature(feature));
}
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index c2e1947..e66e55f 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -70,8 +70,8 @@ protected:
std::string LanguageCompilerRule(const std::string& lang) const
{ return lang + "_COMPILER"; }
- const char* GetFeature(const char* feature);
- bool GetFeatureAsBool(const char* feature);
+ const char* GetFeature(const std::string& feature);
+ bool GetFeatureAsBool(const std::string& feature);
void AddFeatureFlags(std::string& flags, const std::string& lang);
/**
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b8e662a..25ca168 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2549,7 +2549,7 @@ void cmTarget::GetTargetVersion(bool soversion,
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetFeature(const char* feature,
+const char* cmTarget::GetFeature(const std::string& feature,
const std::string& config) const
{
if(!config.empty())
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 65fbb0f..15f00be 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -232,7 +232,7 @@ public:
bool GetPropertyAsBool(const std::string& prop) const;
void CheckProperty(const std::string& prop, cmMakefile* context) const;
- const char* GetFeature(const char* feature,
+ const char* GetFeature(const std::string& feature,
const std::string& config) const;
bool IsImported() const {return this->IsImportedTarget;}