cmCustomCommand.cxx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmCustomCommand.h"
  14. //----------------------------------------------------------------------------
  15. cmCustomCommand::cmCustomCommand()
  16. {
  17. }
  18. //----------------------------------------------------------------------------
  19. cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
  20. m_Output(r.m_Output),
  21. m_Depends(r.m_Depends),
  22. m_CommandLines(r.m_CommandLines),
  23. m_Comment(r.m_Comment)
  24. {
  25. }
  26. //----------------------------------------------------------------------------
  27. cmCustomCommand::cmCustomCommand(const char* output,
  28. const std::vector<std::string>& depends,
  29. const cmCustomCommandLines& commandLines,
  30. const char* comment):
  31. m_Output(output?output:""),
  32. m_Depends(depends),
  33. m_CommandLines(commandLines),
  34. m_Comment(comment?comment:"")
  35. {
  36. }
  37. //----------------------------------------------------------------------------
  38. const char* cmCustomCommand::GetOutput() const
  39. {
  40. return m_Output.c_str();
  41. }
  42. //----------------------------------------------------------------------------
  43. const std::vector<std::string>& cmCustomCommand::GetDepends() const
  44. {
  45. return m_Depends;
  46. }
  47. //----------------------------------------------------------------------------
  48. const cmCustomCommandLines& cmCustomCommand::GetCommandLines() const
  49. {
  50. return m_CommandLines;
  51. }
  52. //----------------------------------------------------------------------------
  53. const char* cmCustomCommand::GetComment() const
  54. {
  55. return m_Comment.c_str();
  56. }