cmCommand.cxx 928 B

12345678910111213141516171819202122232425262728293031
  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 "cmCommand.h"
  4. #include "cmExecutionStatus.h"
  5. #include "cmMakefile.h"
  6. struct cmListFileArgument;
  7. void cmCommand::SetExecutionStatus(cmExecutionStatus* status)
  8. {
  9. this->Status = status;
  10. this->Makefile = &status->GetMakefile();
  11. }
  12. bool cmCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args,
  13. cmExecutionStatus& status)
  14. {
  15. std::vector<std::string> expandedArguments;
  16. if (!this->Makefile->ExpandArguments(args, expandedArguments)) {
  17. // There was an error expanding arguments. It was already
  18. // reported, so we can skip this command without error.
  19. return true;
  20. }
  21. return this->InitialPass(expandedArguments, status);
  22. }
  23. void cmCommand::SetError(const std::string& e)
  24. {
  25. this->Status->SetError(e);
  26. }