cmcmd.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <vector>
  7. #include <cm/optional>
  8. #include "cmsys/Status.hxx"
  9. #include "cmCryptoHash.h"
  10. namespace cm {
  11. namespace StdIo {
  12. class Console;
  13. }
  14. }
  15. class cmcmd
  16. {
  17. public:
  18. /**
  19. * Execute commands during the build process. Supports options such
  20. * as echo, remove file etc.
  21. */
  22. static int ExecuteCMakeCommand(std::vector<std::string> const&,
  23. cm::optional<cm::StdIo::Console> console);
  24. protected:
  25. static int HandleCoCompileCommands(std::vector<std::string> const& args);
  26. static int HashSumFile(std::vector<std::string> const& args,
  27. cmCryptoHash::Algo algo);
  28. static int SymlinkLibrary(std::vector<std::string> const& args);
  29. static int SymlinkExecutable(std::vector<std::string> const& args);
  30. static cmsys::Status SymlinkInternal(std::string const& file,
  31. std::string const& link);
  32. static int ExecuteEchoColor(std::vector<std::string> const& args);
  33. static int ExecuteLinkScript(std::vector<std::string> const& args);
  34. static int WindowsCEEnvironment(char const* version,
  35. std::string const& name);
  36. static int RunPreprocessor(std::vector<std::string> const& command,
  37. std::string const& intermediate_file);
  38. static int RunLLVMRC(std::vector<std::string> const& args);
  39. static int VisualStudioLink(std::vector<std::string> const& args, int type,
  40. cm::optional<cm::StdIo::Console> console);
  41. };