cmVisualStudioGeneratorOptions.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmVisualStudioGeneratorOptions_h
  11. #define cmVisualStudioGeneratorOptions_h
  12. #include "cmLocalVisualStudioGenerator.h"
  13. #include "cmIDEOptions.h"
  14. typedef cmIDEFlagTable cmVS7FlagTable;
  15. class cmVisualStudio10TargetGenerator;
  16. //----------------------------------------------------------------------------
  17. class cmVisualStudioGeneratorOptions: public cmIDEOptions
  18. {
  19. public:
  20. // Construct an options table for a given tool.
  21. enum Tool
  22. {
  23. Compiler,
  24. ResourceCompiler,
  25. Linker,
  26. FortranCompiler
  27. };
  28. cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
  29. Tool tool,
  30. cmVS7FlagTable const* table,
  31. cmVS7FlagTable const* extraTable = 0,
  32. cmVisualStudio10TargetGenerator* g = 0);
  33. // Store options from command line flags.
  34. void Parse(const char* flags);
  35. void ParseFinish();
  36. // Fix the ExceptionHandling option to default to off.
  37. void FixExceptionHandlingDefault();
  38. // Store options for verbose builds.
  39. void SetVerboseMakefile(bool verbose);
  40. // Check for specific options.
  41. bool UsingUnicode() const;
  42. bool UsingSBCS() const;
  43. bool IsDebug() const;
  44. bool IsWinRt() const;
  45. // Write options to output.
  46. void OutputPreprocessorDefinitions(std::ostream& fout,
  47. const char* prefix,
  48. const char* suffix,
  49. const std::string& lang);
  50. void OutputFlagMap(std::ostream& fout, const char* indent);
  51. void OutputAdditionalOptions(std::ostream& fout,
  52. const char* prefix,
  53. const char* suffix);
  54. void SetConfiguration(const char* config);
  55. private:
  56. cmLocalVisualStudioGenerator* LocalGenerator;
  57. cmLocalVisualStudioGenerator::VSVersion Version;
  58. std::string Configuration;
  59. Tool CurrentTool;
  60. cmVisualStudio10TargetGenerator* TargetGenerator;
  61. bool FortranRuntimeDebug;
  62. bool FortranRuntimeDLL;
  63. bool FortranRuntimeMT;
  64. virtual void StoreUnknownFlag(const char* flag);
  65. };
  66. #endif