Selaa lähdekoodia

Remove use of ExpandSourceListArguments.

By now, it is only an expensive copy.
Stephen Kelly 10 vuotta sitten
vanhempi
sitoutus
bd990c803b

+ 3 - 4
Source/cmCPluginAPI.cxx

@@ -438,15 +438,14 @@ void CCONV cmExpandSourceListArguments(void *arg,
                                  char ***resArgv,
                                  unsigned int startArgumentIndex)
 {
-  cmMakefile *mf = static_cast<cmMakefile *>(arg);
+  (void)arg;
+  (void)startArgumentIndex;
   std::vector<std::string> result;
-  std::vector<std::string> args2;
   int i;
   for (i = 0; i < numArgs; ++i)
     {
-    args2.push_back(args[i]);
+    result.push_back(args[i]);
     }
-  mf->ExpandSourceListArguments(args2, result, startArgumentIndex);
   int resargc = static_cast<int>(result.size());
   char **resargv = 0;
   if (resargc)

+ 2 - 5
Source/cmFLTKWrapUICommand.cxx

@@ -31,9 +31,6 @@ bool cmFLTKWrapUICommand
   // get parameter for the command
   this->Target = args[0];  // Target that will use the generated files
 
-  std::vector<std::string> newArgs;
-  this->Makefile->ExpandSourceListArguments(args,newArgs, 1);
-
   // get the list of GUI files from which .cxx and .h will be generated
   std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory();
 
@@ -45,8 +42,8 @@ bool cmFLTKWrapUICommand
   this->Makefile->AddIncludeDirectories( outputDirectories );
   }
 
-  for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
-      i != newArgs.end(); i++)
+  for(std::vector<std::string>::const_iterator i = (args.begin() + 1);
+      i != args.end(); i++)
     {
     cmSourceFile *curr = this->Makefile->GetSource(*i);
     // if we should use the source GUI

+ 2 - 5
Source/cmInstallFilesCommand.cxx

@@ -15,9 +15,9 @@
 
 // cmExecutableCommand
 bool cmInstallFilesCommand
-::InitialPass(std::vector<std::string> const& argsIn, cmExecutionStatus &)
+::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
 {
-  if(argsIn.size() < 2)
+  if(args.size() < 2)
     {
     this->SetError("called with incorrect number of arguments");
     return false;
@@ -27,9 +27,6 @@ bool cmInstallFilesCommand
   this->Makefile->GetLocalGenerator()
     ->GetGlobalGenerator()->EnableInstallTarget();
 
-  std::vector<std::string> args;
-  this->Makefile->ExpandSourceListArguments(argsIn, args, 2);
-
   this->Destination = args[0];
 
   if((args.size() > 1) && (args[1] == "FILES"))

+ 3 - 7
Source/cmQTWrapCPPCommand.cxx

@@ -12,19 +12,15 @@
 #include "cmQTWrapCPPCommand.h"
 
 // cmQTWrapCPPCommand
-bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn,
+bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
                                      cmExecutionStatus &)
 {
-  if(argsIn.size() < 3 )
+  if(args.size() < 3 )
     {
     this->SetError("called with incorrect number of arguments");
     return false;
     }
 
-  // This command supports source list inputs for compatibility.
-  std::vector<std::string> args;
-  this->Makefile->ExpandSourceListArguments(argsIn, args, 2);
-
   // Get the moc executable to run in the custom command.
   const char* moc_exe =
     this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE");
@@ -35,7 +31,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn,
     this->Makefile->GetSafeDefinition(sourceList);
 
   // Create a rule for all sources listed.
-  for(std::vector<std::string>::iterator j = (args.begin() + 2);
+  for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
       j != args.end(); ++j)
     {
     cmSourceFile *curr = this->Makefile->GetSource(*j);

+ 3 - 7
Source/cmQTWrapUICommand.cxx

@@ -12,19 +12,15 @@
 #include "cmQTWrapUICommand.h"
 
 // cmQTWrapUICommand
-bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn,
+bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
                                     cmExecutionStatus &)
 {
-  if(argsIn.size() < 4 )
+  if(args.size() < 4 )
     {
     this->SetError("called with incorrect number of arguments");
     return false;
     }
 
-  // This command supports source list inputs for compatibility.
-  std::vector<std::string> args;
-  this->Makefile->ExpandSourceListArguments(argsIn, args, 3);
-
   // Get the uic and moc executables to run in the custom commands.
   const char* uic_exe =
     this->Makefile->GetRequiredDefinition("QT_UIC_EXECUTABLE");
@@ -40,7 +36,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn,
     this->Makefile->GetSafeDefinition(sourceList);
 
   // Create rules for all sources listed.
-  for(std::vector<std::string>::iterator j = (args.begin() + 3);
+  for(std::vector<std::string>::const_iterator j = (args.begin() + 3);
       j != args.end(); ++j)
     {
     cmSourceFile *curr = this->Makefile->GetSource(*j);