diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-08-06 21:10:04 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-08-07 08:16:32 (GMT) |
commit | 9ba0bf60c6a1dc0904c40575efd69bba580b0902 (patch) | |
tree | 1e16db46ba7409495923d29efb1c541f4e35eb24 /Source/cmAddCompileDefinitionsCommand.cxx | |
parent | 52d9cd624fc0da9b26fd677d92e67dd033603337 (diff) | |
download | CMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.zip CMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.tar.gz CMake-9ba0bf60c6a1dc0904c40575efd69bba580b0902.tar.bz2 |
cmA*Command: Turn into free functions
Ref: #19499
Diffstat (limited to 'Source/cmAddCompileDefinitionsCommand.cxx')
-rw-r--r-- | Source/cmAddCompileDefinitionsCommand.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmAddCompileDefinitionsCommand.cxx b/Source/cmAddCompileDefinitionsCommand.cxx index 0474819..b00a4a7 100644 --- a/Source/cmAddCompileDefinitionsCommand.cxx +++ b/Source/cmAddCompileDefinitionsCommand.cxx @@ -2,19 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCompileDefinitionsCommand.h" +#include "cmExecutionStatus.h" #include "cmMakefile.h" -class cmExecutionStatus; - -bool cmAddCompileDefinitionsCommand::InitialPass( - std::vector<std::string> const& args, cmExecutionStatus&) +bool cmAddCompileDefinitionsCommand(std::vector<std::string> const& args, + cmExecutionStatus& status) { - if (args.empty()) { - return true; - } - + cmMakefile& mf = status.GetMakefile(); for (std::string const& i : args) { - this->Makefile->AddCompileDefinition(i); + mf.AddCompileDefinition(i); } return true; } |