cmInstallProgramsCommand.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 cmInstallProgramsCommand_h
  4. #define cmInstallProgramsCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmCommand.h"
  9. class cmExecutionStatus;
  10. /** \class cmInstallProgramsCommand
  11. * \brief Specifies where to install some programs
  12. *
  13. * cmInstallProgramsCommand specifies the relative path where a list of
  14. * programs should be installed.
  15. */
  16. class cmInstallProgramsCommand : public cmCommand
  17. {
  18. public:
  19. /**
  20. * This is a virtual constructor for the command.
  21. */
  22. cmCommand* Clone() override { return new cmInstallProgramsCommand; }
  23. /**
  24. * This is called when the command is first encountered in
  25. * the CMakeLists.txt file.
  26. */
  27. bool InitialPass(std::vector<std::string> const& args,
  28. cmExecutionStatus& status) override;
  29. /**
  30. * This is called at the end after all the information
  31. * specified by the command is accumulated. Most commands do
  32. * not implement this method. At this point, reading and
  33. * writing to the cache can be done.
  34. */
  35. void FinalPass() override;
  36. bool HasFinalPass() const override { return true; }
  37. protected:
  38. std::string FindInstallSource(const char* name) const;
  39. private:
  40. std::vector<std::string> FinalArgs;
  41. std::string Destination;
  42. std::vector<std::string> Files;
  43. };
  44. #endif