summaryrefslogtreecommitdiffstats
path: root/Source/cmAddDefinitionsCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-08-06 21:10:04 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-08-07 08:16:32 (GMT)
commit9ba0bf60c6a1dc0904c40575efd69bba580b0902 (patch)
tree1e16db46ba7409495923d29efb1c541f4e35eb24 /Source/cmAddDefinitionsCommand.cxx
parent52d9cd624fc0da9b26fd677d92e67dd033603337 (diff)
downloadCMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.zip
CMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.tar.gz
CMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.tar.bz2
cmA*Command: Turn into free functions
Ref: #19499
Diffstat (limited to 'Source/cmAddDefinitionsCommand.cxx')
-rw-r--r--Source/cmAddDefinitionsCommand.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx
index 62e57a3..0b10aee 100644
--- a/Source/cmAddDefinitionsCommand.cxx
+++ b/Source/cmAddDefinitionsCommand.cxx
@@ -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;
}