cmCommand.cxx 908 B

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