cmVisualStudioGeneratorOptions.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 cmVisualStudioGeneratorOptions_h
  14. #define cmVisualStudioGeneratorOptions_h
  15. #include "cmLocalGenerator.h"
  16. #include "cmIDEOptions.h"
  17. typedef cmIDEFlagTable cmVS7FlagTable;
  18. class cmVisualStudio10TargetGenerator;
  19. //----------------------------------------------------------------------------
  20. class cmVisualStudioGeneratorOptions: public cmIDEOptions
  21. {
  22. public:
  23. // Construct an options table for a given tool.
  24. enum Tool
  25. {
  26. Compiler,
  27. Linker,
  28. FortranCompiler
  29. };
  30. cmVisualStudioGeneratorOptions(cmLocalGenerator* lg,
  31. int version,
  32. Tool tool,
  33. cmVS7FlagTable const* table,
  34. cmVS7FlagTable const* extraTable = 0,
  35. cmVisualStudio10TargetGenerator* g = 0);
  36. // Store options from command line flags.
  37. void Parse(const char* flags);
  38. // Fix the ExceptionHandling option to default to off.
  39. void FixExceptionHandlingDefault();
  40. // Store options for verbose builds.
  41. void SetVerboseMakefile(bool verbose);
  42. // Check for specific options.
  43. bool UsingUnicode();
  44. bool IsDebug();
  45. // Write options to output.
  46. void OutputPreprocessorDefinitions(std::ostream& fout,
  47. const char* prefix,
  48. const char* suffix);
  49. void OutputFlagMap(std::ostream& fout, const char* indent);
  50. void OutputAdditionalOptions(std::ostream& fout,
  51. const char* prefix,
  52. const char* suffix);
  53. void SetConfiguration(const char* config);
  54. private:
  55. cmLocalGenerator* LocalGenerator;
  56. int Version;
  57. std::string Configuration;
  58. Tool CurrentTool;
  59. cmVisualStudio10TargetGenerator* TargetGenerator;
  60. virtual void StoreUnknownFlag(const char* flag);
  61. };
  62. #endif