summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-03-10 22:32:00 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-05-02 17:05:44 (GMT)
commit3c640891177923e71a0a50d26988a3595a0f3c43 (patch)
tree53c39f3faeb3ee3a677031d7ca7f369f1960ea6d
parent94429287454a3b40268dd48db7b38f158bbecd93 (diff)
downloadCMake-3c640891177923e71a0a50d26988a3595a0f3c43.zip
CMake-3c640891177923e71a0a50d26988a3595a0f3c43.tar.gz
CMake-3c640891177923e71a0a50d26988a3595a0f3c43.tar.bz2
ninja: Use string parameters
-rw-r--r--Source/cmLocalNinjaGenerator.cxx2
-rw-r--r--Source/cmLocalNinjaGenerator.h2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx7
-rw-r--r--Source/cmNinjaTargetGenerator.h4
4 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 2f763ce..2ac8363 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -294,7 +294,7 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os)
os << std::endl;
}
-std::string cmLocalNinjaGenerator::ConvertToNinjaPath(const char *path)
+std::string cmLocalNinjaGenerator::ConvertToNinjaPath(const std::string& path)
{
std::string convPath = this->Convert(path, cmLocalGenerator::HOME_OUTPUT);
#ifdef _WIN32
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index e91e60b..11321b8 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -67,7 +67,7 @@ public:
std::string GetHomeRelativeOutputPath() const
{ return this->HomeRelativeOutputPath; }
- std::string ConvertToNinjaPath(const char *path);
+ std::string ConvertToNinjaPath(const std::string& path);
struct map_to_ninja_path {
cmLocalNinjaGenerator *LocalGenerator;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index cb6eb90..358fb51 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -760,9 +760,10 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
this->Generator->GetGlobalGenerator()->AddDependencyToAll(output);
}
-void cmNinjaTargetGenerator::addPoolNinjaVariable(const char* pool_property,
- cmTarget* target,
- cmNinjaVars& vars)
+void cmNinjaTargetGenerator::addPoolNinjaVariable(
+ const std::string& pool_property,
+ cmTarget* target,
+ cmNinjaVars& vars)
{
const char* pool = target->GetProperty(pool_property);
if (pool)
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 8073af2..be516e0 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -85,7 +85,7 @@ protected:
std::string ComputeDefines(cmSourceFile const* source,
const std::string& language);
- std::string ConvertToNinjaPath(const char *path) const {
+ std::string ConvertToNinjaPath(const std::string& path) const {
return this->GetLocalGenerator()->ConvertToNinjaPath(path);
}
cmLocalNinjaGenerator::map_to_ninja_path MapToNinjaPath() const {
@@ -142,7 +142,7 @@ protected:
cmOSXBundleGenerator* OSXBundleGenerator;
std::set<std::string> MacContentFolders;
- void addPoolNinjaVariable(const char* pool_property,
+ void addPoolNinjaVariable(const std::string& pool_property,
cmTarget* target,
cmNinjaVars& vars);