|
|
@@ -2,18 +2,23 @@
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
|
#include "cmSetSourceFilesPropertiesCommand.h"
|
|
|
|
|
|
+#include "cmExecutionStatus.h"
|
|
|
#include "cmMakefile.h"
|
|
|
#include "cmSourceFile.h"
|
|
|
#include "cmStringAlgorithms.h"
|
|
|
|
|
|
-class cmExecutionStatus;
|
|
|
+static bool RunCommand(cmMakefile* mf,
|
|
|
+ std::vector<std::string>::const_iterator filebeg,
|
|
|
+ std::vector<std::string>::const_iterator fileend,
|
|
|
+ std::vector<std::string>::const_iterator propbeg,
|
|
|
+ std::vector<std::string>::const_iterator propend,
|
|
|
+ std::string& errors);
|
|
|
|
|
|
-// cmSetSourceFilesPropertiesCommand
|
|
|
-bool cmSetSourceFilesPropertiesCommand::InitialPass(
|
|
|
- std::vector<std::string> const& args, cmExecutionStatus&)
|
|
|
+bool cmSetSourceFilesPropertiesCommand(std::vector<std::string> const& args,
|
|
|
+ cmExecutionStatus& status)
|
|
|
{
|
|
|
if (args.size() < 2) {
|
|
|
- this->SetError("called with incorrect number of arguments");
|
|
|
+ status.SetError("called with incorrect number of arguments");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -29,22 +34,24 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(
|
|
|
++j;
|
|
|
}
|
|
|
|
|
|
+ cmMakefile& mf = status.GetMakefile();
|
|
|
+
|
|
|
// now call the worker function
|
|
|
std::string errors;
|
|
|
- bool ret = cmSetSourceFilesPropertiesCommand::RunCommand(
|
|
|
- this->Makefile, args.begin(), args.begin() + numFiles,
|
|
|
- args.begin() + numFiles, args.end(), errors);
|
|
|
+ bool ret = RunCommand(&mf, args.begin(), args.begin() + numFiles,
|
|
|
+ args.begin() + numFiles, args.end(), errors);
|
|
|
if (!ret) {
|
|
|
- this->SetError(errors);
|
|
|
+ status.SetError(errors);
|
|
|
}
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-bool cmSetSourceFilesPropertiesCommand::RunCommand(
|
|
|
- cmMakefile* mf, std::vector<std::string>::const_iterator filebeg,
|
|
|
- std::vector<std::string>::const_iterator fileend,
|
|
|
- std::vector<std::string>::const_iterator propbeg,
|
|
|
- std::vector<std::string>::const_iterator propend, std::string& errors)
|
|
|
+static bool RunCommand(cmMakefile* mf,
|
|
|
+ std::vector<std::string>::const_iterator filebeg,
|
|
|
+ std::vector<std::string>::const_iterator fileend,
|
|
|
+ std::vector<std::string>::const_iterator propbeg,
|
|
|
+ std::vector<std::string>::const_iterator propend,
|
|
|
+ std::string& errors)
|
|
|
{
|
|
|
std::vector<std::string> propertyPairs;
|
|
|
bool generated = false;
|