cmTargetSourcesCommand.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2014 Stephen Kelly <[email protected]>
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmTargetSourcesCommand_h
  11. #define cmTargetSourcesCommand_h
  12. #include "cmTargetPropCommandBase.h"
  13. //----------------------------------------------------------------------------
  14. class cmTargetSourcesCommand : public cmTargetPropCommandBase
  15. {
  16. public:
  17. /**
  18. * This is a virtual constructor for the command.
  19. */
  20. virtual cmCommand* Clone()
  21. {
  22. return new cmTargetSourcesCommand;
  23. }
  24. /**
  25. * This is called when the command is first encountered in
  26. * the CMakeLists.txt file.
  27. */
  28. virtual bool InitialPass(std::vector<std::string> const& args,
  29. cmExecutionStatus &status);
  30. /**
  31. * The name of the command as specified in CMakeList.txt.
  32. */
  33. virtual std::string GetName() const { return "target_sources";}
  34. cmTypeMacro(cmTargetSourcesCommand, cmTargetPropCommandBase);
  35. private:
  36. virtual void HandleImportedTarget(const std::string &tgt);
  37. virtual void HandleMissingTarget(const std::string &name);
  38. virtual void HandleDirectContent(cmTarget *tgt,
  39. const std::vector<std::string> &content,
  40. bool prepend, bool system);
  41. virtual std::string Join(const std::vector<std::string> &content);
  42. };
  43. #endif