1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #include "cmEnableLanguageCommand.h"
5 #include "cmExecutionStatus.h"
6 #include "cmMakefile.h"
8 bool cmEnableLanguageCommand(std::vector<std::string> const& args,
9 cmExecutionStatus& status)
12 status.SetError("called with incorrect number of arguments");
16 bool optional = false;
17 std::vector<std::string> languages;
18 for (std::string const& it : args) {
19 if (it == "OPTIONAL") {
22 languages.push_back(it);
26 status.GetMakefile().EnableLanguage(languages, optional);