cmWXCommandLineInfo.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. // cmCommandLineInfo.h : main header file for the command line arguments
  14. //
  15. #if !defined(CMAKECOMMANDLINEINFO_H)
  16. #define CMAKECOMMANDLINEINFO_H
  17. #include "cmStandardIncludes.h"
  18. ///////////////////////////////////////////////////////////////
  19. // cmCommandLineInfo:
  20. // See cmCommandLineInfo.cxx for the implementation of this class
  21. //
  22. class cmCommandLineInfo
  23. {
  24. // Construction
  25. public:
  26. cmCommandLineInfo();
  27. virtual ~cmCommandLineInfo();
  28. // Parse the command line
  29. void ParseCommandLine(int argc, char* argv[]);
  30. // Set the valid arguments
  31. void SetValidArguments(const std::string& va) { this->m_ValidArguments = va; }
  32. // Retrieve the path of executable
  33. std::string GetPathToExecutable() { return this->m_ExecutablePath; }
  34. // Attributes
  35. public:
  36. std::string m_WhereSource;
  37. std::string m_WhereBuild;
  38. bool m_AdvancedValues;
  39. std::string m_GeneratorChoiceString;
  40. std::string m_LastUnknownParameter;
  41. std::string m_ExecutablePath;
  42. bool m_ExitAfterLoad;
  43. protected:
  44. // Parse one argument
  45. void ParseParam(const std::string& parameter, bool know_about, bool last);
  46. // Return boolean value of the string
  47. static int GetBoolValue(const std::string&);
  48. std::string m_ValidArguments;
  49. };
  50. #endif // !defined(CMAKECOMMANDLINEINFO_H)