https://github.com/Kitware/CMake
Revision f6c3820549affa910ec5f710ec61f1f3414b13ab authored by Brad King on 27 March 2020, 11:42:33 UTC, committed by Kitware Robot on 27 March 2020, 11:43:02 UTC
4b8297721f CheckIPOSupported: Avoid polluting cache with common name 'result'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4528
2 parent s 1915a09 + 4b82977
Raw File
Tip revision: f6c3820549affa910ec5f710ec61f1f3414b13ab authored by Brad King on 27 March 2020, 11:42:33 UTC
Merge topic 'CheckIPOSupported-cleanup-cache' into release-3.17
Tip revision: f6c3820
cmEnableLanguageCommand.cxx
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#include "cmEnableLanguageCommand.h"

#include "cmExecutionStatus.h"
#include "cmMakefile.h"

bool cmEnableLanguageCommand(std::vector<std::string> const& args,
                             cmExecutionStatus& status)
{
  if (args.empty()) {
    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;
    } else {
      languages.push_back(it);
    }
  }

  status.GetMakefile().EnableLanguage(languages, optional);
  return true;
}
back to top