diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-09-12 08:09:06 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-09-12 16:16:17 (GMT) |
commit | 28cf1271ed6051af46ff68f52a8c9c0435ca1234 (patch) | |
tree | 87b30137944697367e8e8359380cda6e54cd1aaa /Source/cmEnableLanguageCommand.cxx | |
parent | 41b0d60f48c3d8d882ec25b56d638b392121fcc8 (diff) | |
download | CMake-28cf1271ed6051af46ff68f52a8c9c0435ca1234.zip CMake-28cf1271ed6051af46ff68f52a8c9c0435ca1234.tar.gz CMake-28cf1271ed6051af46ff68f52a8c9c0435ca1234.tar.bz2 |
cmEnableLanguageCommand: Port away from cmCommand
Ref: #19499
Diffstat (limited to 'Source/cmEnableLanguageCommand.cxx')
-rw-r--r-- | Source/cmEnableLanguageCommand.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index ddd26de..59522c0 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -2,20 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEnableLanguageCommand.h" +#include "cmExecutionStatus.h" #include "cmMakefile.h" -class cmExecutionStatus; - -// cmEnableLanguageCommand -bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args, - cmExecutionStatus&) +bool cmEnableLanguageCommand(std::vector<std::string> const& args, + cmExecutionStatus& status) { - bool optional = false; - std::vector<std::string> languages; if (args.empty()) { - this->SetError("called with incorrect number of arguments"); + status.SetError("called with incorrect number of arguments"); return false; } + + bool optional = false; + std::vector<std::string> languages; for (std::string const& it : args) { if (it == "OPTIONAL") { optional = true; @@ -24,6 +23,6 @@ bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args, } } - this->Makefile->EnableLanguage(languages, optional); + status.GetMakefile().EnableLanguage(languages, optional); return true; } |