diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-09-12 14:28:00 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-09-12 16:16:17 (GMT) |
commit | 95f23ea5d5a07da503f8e2ab9c52c82086cdcae4 (patch) | |
tree | 254ea3cd2162af097f82daab7980aa1c0d449585 /Source/cmSetSourceFilesPropertiesCommand.cxx | |
parent | 706400d417e6435a442af2626a8430016e24aa9d (diff) | |
download | CMake-95f23ea5d5a07da503f8e2ab9c52c82086cdcae4.zip CMake-95f23ea5d5a07da503f8e2ab9c52c82086cdcae4.tar.gz CMake-95f23ea5d5a07da503f8e2ab9c52c82086cdcae4.tar.bz2 |
cmSetSourceFilesPropertiesCommand: Port away from cmCommand
Ref: #19499
Diffstat (limited to 'Source/cmSetSourceFilesPropertiesCommand.cxx')
-rw-r--r-- | Source/cmSetSourceFilesPropertiesCommand.cxx | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 8e3217f..7ff604b 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -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; |