cmA*Command: Turn into free functions

Ref: #19499
This commit is contained in:
Regina Pfeifer
2019-08-06 23:10:04 +02:00
parent 52d9cd624f
commit 9ba0bf60c6
25 changed files with 257 additions and 594 deletions
+5 -11
View File
@@ -2,21 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAddDefinitionsCommand.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
class cmExecutionStatus;
// cmAddDefinitionsCommand
bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&)
bool cmAddDefinitionsCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
{
// it is OK to have no arguments
if (args.empty()) {
return true;
}
cmMakefile& mf = status.GetMakefile();
for (std::string const& i : args) {
this->Makefile->AddDefineFlag(i);
mf.AddDefineFlag(i);
}
return true;
}