mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
cmSetSourceFilesPropertiesCommand: Port away from cmCommand
Ref: #19499
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user