diff options
Diffstat (limited to 'Source/cmEnableLanguageCommand.cxx')
-rw-r--r-- | Source/cmEnableLanguageCommand.cxx | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index dcabf6a..0ebe778 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -12,32 +12,24 @@ #include "cmEnableLanguageCommand.h" // cmEnableLanguageCommand -bool cmEnableLanguageCommand -::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &) +bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args, + cmExecutionStatus&) { bool optional = false; std::vector<std::string> languages; - if(args.size() < 1 ) - { - this->SetError - ("called with incorrect number of arguments"); + if (args.size() < 1) { + this->SetError("called with incorrect number of arguments"); return false; - } + } for (std::vector<std::string>::const_iterator it = args.begin(); - it != args.end(); - ++it) - { - if ((*it) == "OPTIONAL") - { + it != args.end(); ++it) { + if ((*it) == "OPTIONAL") { optional = true; - } - else - { + } else { languages.push_back(*it); - } } + } this->Makefile->EnableLanguage(languages, optional); return true; } - |