cmFileCommand.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 HandleMakeDirectoryCommand(std::vector<std::string> const& args);
  36. bool HandleRelativePathCommand(std::vector<std::string> const& args);
  37. bool HandleCMakePathCommand(std::vector<std::string> const& args,
  38. bool nativePath);
  39. bool HandleReadElfCommand(std::vector<std::string> const& args);
  40. bool HandleRPathChangeCommand(std::vector<std::string> const& args);
  41. bool HandleRPathCheckCommand(std::vector<std::string> const& args);
  42. bool HandleRPathRemoveCommand(std::vector<std::string> const& args);
  43. bool HandleDifferentCommand(std::vector<std::string> const& args);
  44. bool HandleCopyCommand(std::vector<std::string> const& args);
  45. bool HandleInstallCommand(std::vector<std::string> const& args);
  46. bool HandleDownloadCommand(std::vector<std::string> const& args);
  47. bool HandleUploadCommand(std::vector<std::string> const& args);
  48. bool HandleTimestampCommand(std::vector<std::string> const& args);
  49. bool HandleGenerateCommand(std::vector<std::string> const& args);
  50. bool HandleLockCommand(std::vector<std::string> const& args);
  51. private:
  52. void AddEvaluationFile(const std::string& inputName,
  53. const std::string& outputExpr,
  54. const std::string& condition, bool inputIsContent);
  55. };
  56. #endif