cmBuildCommand.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 cmBuildCommand_h
  4. #define cmBuildCommand_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 cmBuildCommand
  12. * \brief build_command command
  13. *
  14. * cmBuildCommand implements the build_command CMake command
  15. */
  16. class cmBuildCommand : public cmCommand
  17. {
  18. public:
  19. /**
  20. * This is a virtual constructor for the command.
  21. */
  22. std::unique_ptr<cmCommand> Clone() override
  23. {
  24. return cm::make_unique<cmBuildCommand>();
  25. }
  26. /**
  27. * This is called when the command is first encountered in
  28. * the CMakeLists.txt file.
  29. */
  30. bool InitialPass(std::vector<std::string> const& args,
  31. cmExecutionStatus& status) override;
  32. /**
  33. * The primary command signature with optional, KEYWORD-based args.
  34. */
  35. virtual bool MainSignature(std::vector<std::string> const& args);
  36. /**
  37. * Legacy "exactly 2 args required" signature.
  38. */
  39. virtual bool TwoArgsSignature(std::vector<std::string> const& args);
  40. private:
  41. bool IgnoreErrors() const;
  42. };
  43. #endif