diff options
Diffstat (limited to 'Source/cmEnableLanguageCommand.cxx')
-rw-r--r-- | Source/cmEnableLanguageCommand.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index c778884..2713b62 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -20,13 +20,29 @@ bool cmEnableLanguageCommand ::InitialPass(std::vector<std::string> const& args) { + bool optional = false; + std::vector<std::string> languages; if(args.size() < 1 ) { this->SetError ("ENABLE_LANGUAGE called with incorrect number of arguments"); return false; } - this->Makefile->EnableLanguage(args); + for (std::vector<std::string>::const_iterator it = args.begin(); + it != args.end(); + ++it) + { + if ((*it) == "OPTIONAL") + { + optional = true; + } + else + { + languages.push_back(*it); + } + } + + this->Makefile->EnableLanguage(languages, optional); return true; } |