cmSourceGroupCommand.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 cmSourceGroupCommand_h
  4. #define cmSourceGroupCommand_h
  5. #include <cmConfigure.h>
  6. #include <string>
  7. #include <vector>
  8. #include "cmCommand.h"
  9. class cmExecutionStatus;
  10. /** \class cmSourceGroupCommand
  11. * \brief Adds a cmSourceGroup to the cmMakefile.
  12. *
  13. * cmSourceGroupCommand is used to define cmSourceGroups which split up
  14. * source files in to named, organized groups in the generated makefiles.
  15. */
  16. class cmSourceGroupCommand : public cmCommand
  17. {
  18. public:
  19. /**
  20. * This is a virtual constructor for the command.
  21. */
  22. cmCommand* Clone() CM_OVERRIDE { return new cmSourceGroupCommand; }
  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) CM_OVERRIDE;
  29. /**
  30. * The name of the command as specified in CMakeList.txt.
  31. */
  32. std::string GetName() const CM_OVERRIDE { return "source_group"; }
  33. private:
  34. bool processTree(const std::vector<std::string>& args,
  35. std::string& errorMsg);
  36. bool checkTreeArgumentsPreconditions(const std::vector<std::string>& args,
  37. std::string& errorMsg) const;
  38. };
  39. #endif