cmCTestGenericHandler.cxx 1.4 KB

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