[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2730-gb4e3166

Ben Boeckel ben.boeckel at kitware.com
Fri May 2 14:21:53 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  b4e3166d3b2c82dddd3b6ecdd1b77909d554dfc6 (commit)
       via  bc1aefd9643899d9598fd0204d7b6aff78e88637 (commit)
       via  c8a0cca5c818137f5b78c231534c8b3282c63ab2 (commit)
       via  6f1753717d88e71790c4660fec69c316b6341632 (commit)
       via  01b79c6385d32e635b5720d8075a60fd50577c66 (commit)
       via  3c640891177923e71a0a50d26988a3595a0f3c43 (commit)
      from  284d350f6450bdd39374a96717643fedcae4804d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4e3166d3b2c82dddd3b6ecdd1b77909d554dfc6
commit b4e3166d3b2c82dddd3b6ecdd1b77909d554dfc6
Merge: 284d350 bc1aefd
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri May 2 14:21:52 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 2 14:21:52 2014 -0400

    Merge topic 'dev/refactor-source-depends-in-ninja' into next
    
    bc1aefd9 ninja: Factor out custom command order-only depends
    c8a0cca5 ninja: Factor out target-level order-only dependencies
    6f175371 LocalGenerator: Add a string overload for AppendFlags
    01b79c63 ninja: Don't use a stringstream to build an argument list
    3c640891 ninja: Use string parameters


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc1aefd9643899d9598fd0204d7b6aff78e88637
commit bc1aefd9643899d9598fd0204d7b6aff78e88637
Author:     Ben Boeckel <mathstuf at gmail.com>
AuthorDate: Mon Mar 10 21:07:31 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri May 2 13:48:45 2014 -0400

    ninja: Factor out custom command order-only depends
    
    This makes WebKitGTK's CMake build.ninja file go from 165M to 11M and
    configure/generate in 5 seconds.

diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 0b379bd..292a22f 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -502,7 +502,7 @@ cmNinjaTargetGenerator
      this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
      // Record the custom commands for this target. The container is used
      // in WriteObjectBuildStatement when called in a loop below.
-     this->CustomCommands.push_back((*si)->GetCustomCommand());
+     this->CustomCommands.push_back(cc);
      }
   std::vector<cmSourceFile const*> headerSources;
   this->GeneratorTarget->GetHeaderSources(headerSources, config);
@@ -525,6 +525,20 @@ cmNinjaTargetGenerator
 
   cmNinjaDeps orderOnlyDeps;
   this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps);
+
+  // Add order-only dependencies on custom command outputs.
+  for(std::vector<cmCustomCommand const*>::const_iterator
+        cci = this->CustomCommands.begin();
+      cci != this->CustomCommands.end(); ++cci)
+    {
+    cmCustomCommand const* cc = *cci;
+    cmCustomCommandGenerator ccg(*cc, this->GetConfigName(),
+                                 this->GetMakefile());
+    const std::vector<std::string>& ccoutputs = ccg.GetOutputs();
+    std::transform(ccoutputs.begin(), ccoutputs.end(),
+                   std::back_inserter(orderOnlyDeps), MapToNinjaPath());
+    }
+
   cmNinjaDeps orderOnlyTarget;
   orderOnlyTarget.push_back(this->OrderDependsTargetForTarget());
   this->GetGlobalGenerator()->WritePhonyBuild(this->GetBuildFileStream(),
@@ -584,19 +598,6 @@ cmNinjaTargetGenerator
   cmNinjaDeps orderOnlyDeps;
   orderOnlyDeps.push_back(this->OrderDependsTargetForTarget());
 
-  // Add order-only dependencies on custom command outputs.
-  for(std::vector<cmCustomCommand const*>::const_iterator
-        cci = this->CustomCommands.begin();
-      cci != this->CustomCommands.end(); ++cci)
-    {
-    cmCustomCommand const* cc = *cci;
-    cmCustomCommandGenerator ccg(*cc, this->GetConfigName(),
-                                 this->GetMakefile());
-    const std::vector<std::string>& ccoutputs = ccg.GetOutputs();
-    std::transform(ccoutputs.begin(), ccoutputs.end(),
-                   std::back_inserter(orderOnlyDeps), MapToNinjaPath());
-    }
-
   // If the source file is GENERATED and does not have a custom command
   // (either attached to this source file or another one), assume that one of
   // the target dependencies, OBJECT_DEPENDS or header file custom commands

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8a0cca5c818137f5b78c231534c8b3282c63ab2
commit c8a0cca5c818137f5b78c231534c8b3282c63ab2
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Mar 10 18:48:46 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri May 2 13:48:45 2014 -0400

    ninja: Factor out target-level order-only dependencies
    
    This reduces ninja file output even more for projects with lots of
    libraries with entangled transitive dependencies. ParaView goes from the
    previous 58M to about 45M.

diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b95c488..0b379bd 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -121,6 +121,12 @@ void cmNinjaTargetGenerator::AddFeatureFlags(std::string& flags,
     }
 }
 
+std::string
+cmNinjaTargetGenerator::OrderDependsTargetForTarget()
+{
+  return "cmake_order_depends_target_" + this->GetTargetName();
+}
+
 // TODO: Most of the code is picked up from
 // void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink),
 // void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
@@ -516,6 +522,19 @@ cmNinjaTargetGenerator
     {
     this->Objects.push_back(this->GetSourceFilePath(*si));
     }
+
+  cmNinjaDeps orderOnlyDeps;
+  this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps);
+  cmNinjaDeps orderOnlyTarget;
+  orderOnlyTarget.push_back(this->OrderDependsTargetForTarget());
+  this->GetGlobalGenerator()->WritePhonyBuild(this->GetBuildFileStream(),
+                                          "Order-only phony target for "
+                                            + this->GetTargetName(),
+                                          orderOnlyTarget,
+                                          cmNinjaDeps(),
+                                          cmNinjaDeps(),
+                                          orderOnlyDeps);
+
   std::vector<cmSourceFile const*> objectSources;
   this->GeneratorTarget->GetObjectSources(objectSources, config);
   for(std::vector<cmSourceFile const*>::const_iterator
@@ -554,11 +573,6 @@ cmNinjaTargetGenerator
     sourceFileName = this->GetSourceFilePath(source);
   explicitDeps.push_back(sourceFileName);
 
-  // Ensure that the target dependencies are built before any source file in
-  // the target, using order-only dependencies.
-  cmNinjaDeps orderOnlyDeps;
-  this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps);
-
   cmNinjaDeps implicitDeps;
   if(const char* objectDeps = source->GetProperty("OBJECT_DEPENDS")) {
     std::vector<std::string> depList;
@@ -567,6 +581,9 @@ cmNinjaTargetGenerator
                    std::back_inserter(implicitDeps), MapToNinjaPath());
   }
 
+  cmNinjaDeps orderOnlyDeps;
+  orderOnlyDeps.push_back(this->OrderDependsTargetForTarget());
+
   // Add order-only dependencies on custom command outputs.
   for(std::vector<cmCustomCommand const*>::const_iterator
         cci = this->CustomCommands.begin();
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index be516e0..94c420f 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -74,6 +74,10 @@ protected:
   bool GetFeatureAsBool(const std::string& feature);
   void AddFeatureFlags(std::string& flags, const std::string& lang);
 
+  std::string OrderDependsTargetForTarget();
+
+  std::string ComputeOrderDependsForTarget();
+
   /**
    * Compute the flags for compilation of object files for a given @a language.
    * @note Generally it is the value of the variable whose name is computed

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f1753717d88e71790c4660fec69c316b6341632
commit 6f1753717d88e71790c4660fec69c316b6341632
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu May 1 16:07:26 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri May 2 13:48:45 2014 -0400

    LocalGenerator: Add a string overload for AppendFlags

diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 7fe47c3..5fff0fb 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -399,7 +399,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
   lg->GetIncludeDirectories(includes, gtgt, language, config);
   std::string includeFlags =
     lg->GetIncludeFlags(includes, gtgt, language, true); // full include paths
-  lg->AppendFlags(flags, includeFlags.c_str());
+  lg->AppendFlags(flags, includeFlags);
   }
 
   // Append old-style preprocessor definition flags.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f375b5f..6b16721 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2200,7 +2200,7 @@ static void AddVisibilityCompileOption(std::string &flags, cmTarget* target,
     return;
     }
   std::string option = std::string(opt) + prop;
-  lg->AppendFlags(flags, option.c_str());
+  lg->AppendFlags(flags, option);
 }
 
 static void AddInlineVisibilityCompileOption(std::string &flags,
@@ -2384,11 +2384,10 @@ void cmLocalGenerator::AddConfigVariableFlags(std::string& flags,
 
 //----------------------------------------------------------------------------
 void cmLocalGenerator::AppendFlags(std::string& flags,
-                                                const char* newFlags)
+                                   const std::string& newFlags)
 {
-  if(newFlags && *newFlags)
+  if(!newFlags.empty())
     {
-    std::string newf = newFlags;
     if(flags.size())
       {
       flags += " ";
@@ -2398,10 +2397,20 @@ void cmLocalGenerator::AppendFlags(std::string& flags,
 }
 
 //----------------------------------------------------------------------------
+void cmLocalGenerator::AppendFlags(std::string& flags,
+                                   const char* newFlags)
+{
+  if(newFlags && *newFlags)
+    {
+    this->AppendFlags(flags, std::string(newFlags));
+    }
+}
+
+//----------------------------------------------------------------------------
 void cmLocalGenerator::AppendFlagEscape(std::string& flags,
                                         const std::string& rawFlag)
 {
-  this->AppendFlags(flags, this->EscapeForShell(rawFlag).c_str());
+  this->AppendFlags(flags, this->EscapeForShell(rawFlag));
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index cf754aa..32da21b 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -152,6 +152,7 @@ public:
   void AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
                                   const std::string& lang);
   ///! Append flags to a string.
+  virtual void AppendFlags(std::string& flags, const std::string& newFlags);
   virtual void AppendFlags(std::string& flags, const char* newFlags);
   virtual void AppendFlagEscape(std::string& flags,
                                 const std::string& rawFlag);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 7ffe84d..98097b9 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -956,15 +956,15 @@ cmLocalUnixMakefileGenerator3
 
 //----------------------------------------------------------------------------
 void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags,
-                                                const char* newFlags)
+                                                const std::string& newFlags)
 {
-  if(this->WatcomWMake && newFlags && *newFlags)
+  if(this->WatcomWMake && !newFlags.empty())
     {
     std::string newf = newFlags;
     if(newf.find("\\\"") != newf.npos)
       {
       cmSystemTools::ReplaceString(newf, "\\\"", "\"");
-      this->cmLocalGenerator::AppendFlags(flags, newf.c_str());
+      this->cmLocalGenerator::AppendFlags(flags, newf);
       return;
       }
     }
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 99974ee..d089aba 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -168,7 +168,7 @@ public:
                                    const std::string& tgt);
 
   // append flags to a string
-  virtual void AppendFlags(std::string& flags, const char* newFlags);
+  virtual void AppendFlags(std::string& flags, const std::string& newFlags);
 
   // append an echo command
   enum EchoColor { EchoNormal, EchoDepend, EchoBuild, EchoLink,
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 7ac0256..80473f6 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -249,7 +249,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
 
   // Create set of linking flags.
   std::string linkFlags;
-  this->LocalGenerator->AppendFlags(linkFlags, extraFlags.c_str());
+  this->LocalGenerator->AppendFlags(linkFlags, extraFlags);
 
   // Add OSX version flags, if any.
   if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -810,6 +810,6 @@ cmMakefileLibraryTargetGenerator
     // Append the flag since a non-zero version is specified.
     cmOStringStream vflag;
     vflag << flag << major << "." << minor << "." << patch;
-    this->LocalGenerator->AppendFlags(flags, vflag.str().c_str());
+    this->LocalGenerator->AppendFlags(flags, vflag.str());
     }
 }
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d4723ad..73d24a9 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -303,7 +303,7 @@ std::string cmMakefileTargetGenerator::GetFlags(const std::string &l)
 
     // Add include directory flags.
     this->LocalGenerator->
-      AppendFlags(flags,this->GetFrameworkFlags(l).c_str());
+      AppendFlags(flags,this->GetFrameworkFlags(l));
 
     // Add target-specific flags.
     this->LocalGenerator->AddCompileOptions(flags, this->Target,
@@ -551,7 +551,7 @@ cmMakefileTargetGenerator
   std::string langFlags = "$(";
   langFlags += lang;
   langFlags += "_FLAGS)";
-  this->LocalGenerator->AppendFlags(flags, langFlags.c_str());
+  this->LocalGenerator->AppendFlags(flags, langFlags);
 
   std::string configUpper =
     cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName);
@@ -1968,11 +1968,11 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
     std::string arg = "@" +
       this->CreateResponseFile(name.c_str(), includeFlags,
                                this->FlagFileDepends[lang]);
-    this->LocalGenerator->AppendFlags(flags, arg.c_str());
+    this->LocalGenerator->AppendFlags(flags, arg);
     }
   else
     {
-    this->LocalGenerator->AppendFlags(flags, includeFlags.c_str());
+    this->LocalGenerator->AppendFlags(flags, includeFlags);
     }
 }
 
@@ -2044,7 +2044,7 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
     modflag += this->Convert(mod_dir,
                              cmLocalGenerator::START_OUTPUT,
                              cmLocalGenerator::SHELL);
-    this->LocalGenerator->AppendFlags(flags, modflag.c_str());
+    this->LocalGenerator->AppendFlags(flags, modflag);
     }
 
   // If there is a separate module path flag then duplicate the
@@ -2066,7 +2066,7 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
       flg += this->Convert(*idi,
                            cmLocalGenerator::NONE,
                            cmLocalGenerator::SHELL);
-      this->LocalGenerator->AppendFlags(flags, flg.c_str());
+      this->LocalGenerator->AppendFlags(flags, flg);
       }
     }
 }
@@ -2093,7 +2093,7 @@ void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags)
   // vs6's "cl -link" pass it to the linker.
   std::string flag = defFileFlag;
   flag += (this->LocalGenerator->ConvertToLinkReference(def));
-  this->LocalGenerator->AppendFlags(flags, flag.c_str());
+  this->LocalGenerator->AppendFlags(flags, flag);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 358fb51..b95c488 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -169,7 +169,7 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source,
     if(cmGlobalNinjaGenerator::IsMinGW())
       cmSystemTools::ReplaceString(includeFlags, "\\", "/");
 
-    this->LocalGenerator->AppendFlags(languageFlags, includeFlags.c_str());
+    this->LocalGenerator->AppendFlags(languageFlags, includeFlags);
 
     // Append old-style preprocessor definition flags.
     this->LocalGenerator->AppendFlags(languageFlags,
@@ -698,7 +698,7 @@ cmNinjaTargetGenerator
   std::string flag = defFileFlag;
   flag += (this->LocalGenerator->ConvertToLinkReference(
              this->ModuleDefinitionFile));
-  this->LocalGenerator->AppendFlags(flags, flag.c_str());
+  this->LocalGenerator->AppendFlags(flags, flag);
 }
 
 void

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01b79c6385d32e635b5720d8075a60fd50577c66
commit 01b79c6385d32e635b5720d8075a60fd50577c66
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Sat Feb 8 00:30:18 2014 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri May 2 13:22:19 2014 -0400

    ninja: Don't use a stringstream to build an argument list
    
    Streams are expensive to construct (looks like some locale-related
    stuff), so use strings instead.

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 88f1b08..a0caf0e 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -141,7 +141,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
 
   cmGlobalNinjaGenerator::WriteComment(os, comment);
 
-  cmOStringStream arguments;
+  std::string arguments;
 
   // TODO: Better formatting for when there are multiple input/output files.
 
@@ -150,7 +150,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
       i != explicitDeps.end();
       ++i)
     {
-    arguments  << " " << EncodeIdent(EncodePath(*i), os);
+    arguments += " " + EncodeIdent(EncodePath(*i), os);
 
     //we need to track every dependency that comes in, since we are trying
     //to find dependencies that are side effects of build commands
@@ -161,39 +161,39 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
   // Write implicit dependencies.
   if(!implicitDeps.empty())
     {
-    arguments << " |";
+    arguments += " |";
     for(cmNinjaDeps::const_iterator i = implicitDeps.begin();
         i != implicitDeps.end();
         ++i)
-      arguments  << " " << EncodeIdent(EncodePath(*i), os);
+      arguments += " " + EncodeIdent(EncodePath(*i), os);
     }
 
   // Write order-only dependencies.
   if(!orderOnlyDeps.empty())
     {
-    arguments << " ||";
+    arguments += " ||";
     for(cmNinjaDeps::const_iterator i = orderOnlyDeps.begin();
         i != orderOnlyDeps.end();
         ++i)
-      arguments  << " " << EncodeIdent(EncodePath(*i), os);
+      arguments += " " + EncodeIdent(EncodePath(*i), os);
     }
 
-  arguments << "\n";
+  arguments += "\n";
 
-  cmOStringStream build;
+  std::string build;
 
   // Write outputs files.
-  build << "build";
+  build += "build";
   for(cmNinjaDeps::const_iterator i = outputs.begin();
       i != outputs.end(); ++i)
     {
-    build << " " << EncodeIdent(EncodePath(*i), os);
+    build += " " + EncodeIdent(EncodePath(*i), os);
     this->CombinedBuildOutputs.insert( EncodePath(*i) );
     }
-  build << ":";
+  build += ":";
 
   // Write the rule.
-  build << " " << rule;
+  build += " " + rule;
 
   // Write the variables bound to this build statement.
   cmOStringStream variable_assignments;
@@ -203,9 +203,9 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
                                           i->first, i->second, "", 1);
 
   // check if a response file rule should be used
-  std::string buildstr = build.str();
+  std::string buildstr = build;
   std::string assignments = variable_assignments.str();
-  const std::string args = arguments.str();
+  const std::string& args = arguments;
   if (cmdLineLimit > 0
       && args.size() + buildstr.size() + assignments.size()
                                                     > (size_t) cmdLineLimit) {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c640891177923e71a0a50d26988a3595a0f3c43
commit 3c640891177923e71a0a50d26988a3595a0f3c43
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Mar 10 18:32:00 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri May 2 13:05:44 2014 -0400

    ninja: Use string parameters

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);
 

-----------------------------------------------------------------------

Summary of changes:
 Source/cmExtraSublimeTextGenerator.cxx      |    2 +-
 Source/cmGlobalNinjaGenerator.cxx           |   28 ++++++------
 Source/cmLocalGenerator.cxx                 |   19 +++++---
 Source/cmLocalGenerator.h                   |    1 +
 Source/cmLocalNinjaGenerator.cxx            |    2 +-
 Source/cmLocalNinjaGenerator.h              |    2 +-
 Source/cmLocalUnixMakefileGenerator3.cxx    |    6 +--
 Source/cmLocalUnixMakefileGenerator3.h      |    2 +-
 Source/cmMakefileLibraryTargetGenerator.cxx |    4 +-
 Source/cmMakefileTargetGenerator.cxx        |   14 +++---
 Source/cmNinjaTargetGenerator.cxx           |   65 +++++++++++++++++----------
 Source/cmNinjaTargetGenerator.h             |    8 +++-
 12 files changed, 93 insertions(+), 60 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list