cmAddCustomTargetCommand.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 cmAddCustomTargetCommand_h
  4. #define cmAddCustomTargetCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cm_memory.hxx"
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. /** \class cmAddCustomTargetCommand
  12. * \brief Command that adds a target to the build system.
  13. *
  14. * cmAddCustomTargetCommand adds an extra target to the build system.
  15. * This is useful when you would like to add special
  16. * targets like "install,", "clean," and so on.
  17. */
  18. class cmAddCustomTargetCommand : public cmCommand
  19. {
  20. public:
  21. /**
  22. * This is a virtual constructor for the command.
  23. */
  24. std::unique_ptr<cmCommand> Clone() override
  25. {
  26. return cm::make_unique<cmAddCustomTargetCommand>();
  27. }
  28. /**
  29. * This is called when the command is first encountered in
  30. * the CMakeLists.txt file.
  31. */
  32. bool InitialPass(std::vector<std::string> const& args,
  33. cmExecutionStatus& status) override;
  34. };
  35. #endif