cmCTestGenericHandler.cxx 1.7 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. #include "cmCTestGenericHandler.h"
  14. //----------------------------------------------------------------------
  15. cmCTestGenericHandler::cmCTestGenericHandler()
  16. {
  17. m_HandlerVerbose = false;
  18. m_CTest = 0;
  19. }
  20. //----------------------------------------------------------------------
  21. cmCTestGenericHandler::~cmCTestGenericHandler()
  22. {
  23. }
  24. //----------------------------------------------------------------------
  25. void cmCTestGenericHandler::SetOption(const char* op, const char* value)
  26. {
  27. if ( !op )
  28. {
  29. return;
  30. }
  31. if ( !value )
  32. {
  33. cmCTestGenericHandler::t_StringToString::iterator remit
  34. = m_Options.find(op);
  35. if ( remit != m_Options.end() )
  36. {
  37. m_Options.erase(remit);
  38. }
  39. return;
  40. }
  41. m_Options[op] = value;
  42. }
  43. //----------------------------------------------------------------------
  44. const char* cmCTestGenericHandler::GetOption(const char* op)
  45. {
  46. cmCTestGenericHandler::t_StringToString::iterator remit
  47. = m_Options.find(op);
  48. if ( remit == m_Options.end() )
  49. {
  50. return 0;
  51. }
  52. return remit->second.c_str();
  53. }