cmTest.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef cmTest_h
  14. #define cmTest_h
  15. #include "cmCustomCommand.h"
  16. /** \class cmTest
  17. * \brief Represent a test
  18. *
  19. * cmTest is representation of a test.
  20. */
  21. class cmTest
  22. {
  23. public:
  24. /**
  25. */
  26. cmTest();
  27. ~cmTest();
  28. ///! Set the test name
  29. void SetName(const char* name);
  30. const char* GetName() const { return m_Name.c_str(); }
  31. void SetCommand(const char* command);
  32. const char* GetCommand() const { return m_Command.c_str(); }
  33. void SetArguments(const std::vector<cmStdString>& args);
  34. const std::vector<cmStdString>& GetArguments() const
  35. {
  36. return m_Args;
  37. }
  38. /**
  39. * Print the structure to std::cout.
  40. */
  41. void Print() const;
  42. ///! Set/Get a property of this source file
  43. void SetProperty(const char *prop, const char *value);
  44. const char *GetProperty(const char *prop) const;
  45. bool GetPropertyAsBool(const char *prop) const;
  46. private:
  47. std::map<cmStdString,cmStdString> m_Properties;
  48. cmStdString m_Name;
  49. cmStdString m_Command;
  50. std::vector<cmStdString> m_Args;
  51. };
  52. #endif