cmTargetSourcesCommand.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 cmTargetSourcesCommand_h
  4. #define cmTargetSourcesCommand_h
  5. #include <cmConfigure.h>
  6. #include <string>
  7. #include <vector>
  8. #include "cmTargetPropCommandBase.h"
  9. #include "cmTypeMacro.h"
  10. class cmCommand;
  11. class cmExecutionStatus;
  12. class cmTarget;
  13. class cmTargetSourcesCommand : public cmTargetPropCommandBase
  14. {
  15. public:
  16. /**
  17. * This is a virtual constructor for the command.
  18. */
  19. cmCommand* Clone() CM_OVERRIDE { return new cmTargetSourcesCommand; }
  20. /**
  21. * This is called when the command is first encountered in
  22. * the CMakeLists.txt file.
  23. */
  24. bool InitialPass(std::vector<std::string> const& args,
  25. cmExecutionStatus& status) CM_OVERRIDE;
  26. /**
  27. * The name of the command as specified in CMakeList.txt.
  28. */
  29. std::string GetName() const CM_OVERRIDE { return "target_sources"; }
  30. cmTypeMacro(cmTargetSourcesCommand, cmTargetPropCommandBase);
  31. private:
  32. void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE;
  33. void HandleMissingTarget(const std::string& name) CM_OVERRIDE;
  34. bool HandleDirectContent(cmTarget* tgt,
  35. const std::vector<std::string>& content,
  36. bool prepend, bool system) CM_OVERRIDE;
  37. std::string Join(const std::vector<std::string>& content) CM_OVERRIDE;
  38. };
  39. #endif