cmFileCommand.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmFileCommand_h
  4. #define cmFileCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmCommand.h"
  9. class cmExecutionStatus;
  10. /** \class cmFileCommand
  11. * \brief Command for manipulation of files
  12. *
  13. */
  14. class cmFileCommand : public cmCommand
  15. {
  16. public:
  17. /**
  18. * This is a virtual constructor for the command.
  19. */
  20. cmCommand* Clone() override { return new cmFileCommand; }
  21. /**
  22. * This is called when the command is first encountered in
  23. * the CMakeLists.txt file.
  24. */
  25. bool InitialPass(std::vector<std::string> const& args,
  26. cmExecutionStatus& status) override;
  27. protected:
  28. bool HandleRename(std::vector<std::string> const& args);
  29. bool HandleRemove(std::vector<std::string> const& args, bool recurse);
  30. bool HandleWriteCommand(std::vector<std::string> const& args, bool append);
  31. bool HandleReadCommand(std::vector<std::string> const& args);
  32. bool HandleHashCommand(std::vector<std::string> const& args);
  33. bool HandleStringsCommand(std::vector<std::string> const& args);
  34. bool HandleGlobCommand(std::vector<std::string> const& args, bool recurse);
  35. bool HandleTouchCommand(std::vector<std::string> const& args, bool create);
  36. bool HandleMakeDirectoryCommand(std::vector<std::string> const& args);
  37. bool HandleRelativePathCommand(std::vector<std::string> const& args);
  38. bool HandleCMakePathCommand(std::vector<std::string> const& args,
  39. bool nativePath);
  40. bool HandleReadElfCommand(std::vector<std::string> const& args);
  41. bool HandleRPathChangeCommand(std::vector<std::string> const& args);
  42. bool HandleRPathCheckCommand(std::vector<std::string> const& args);
  43. bool HandleRPathRemoveCommand(std::vector<std::string> const& args);
  44. bool HandleDifferentCommand(std::vector<std::string> const& args);
  45. bool HandleCopyCommand(std::vector<std::string> const& args);
  46. bool HandleInstallCommand(std::vector<std::string> const& args);
  47. bool HandleDownloadCommand(std::vector<std::string> const& args);
  48. bool HandleUploadCommand(std::vector<std::string> const& args);
  49. bool HandleTimestampCommand(std::vector<std::string> const& args);
  50. bool HandleGenerateCommand(std::vector<std::string> const& args);
  51. bool HandleLockCommand(std::vector<std::string> const& args);
  52. bool HandleSizeCommand(std::vector<std::string> const& args);
  53. private:
  54. void AddEvaluationFile(const std::string& inputName,
  55. const std::string& outputExpr,
  56. const std::string& condition, bool inputIsContent);
  57. };
  58. #endif