cmVisualStudioGeneratorOptions.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. Linker,
  25. FortranCompiler
  26. };
  27. cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
  28. Tool tool,
  29. cmVS7FlagTable const* table,
  30. cmVS7FlagTable const* extraTable = 0,
  31. cmVisualStudio10TargetGenerator* g = 0);
  32. // Store options from command line flags.
  33. void Parse(const char* flags);
  34. void ParseFinish();
  35. // Fix the ExceptionHandling option to default to off.
  36. void FixExceptionHandlingDefault();
  37. // Store options for verbose builds.
  38. void SetVerboseMakefile(bool verbose);
  39. // Check for specific options.
  40. bool UsingUnicode() const;
  41. bool UsingSBCS() const;
  42. bool IsDebug() const;
  43. // Write options to output.
  44. void OutputPreprocessorDefinitions(std::ostream& fout,
  45. const char* prefix,
  46. const char* suffix,
  47. const char* lang);
  48. void OutputFlagMap(std::ostream& fout, const char* indent);
  49. void OutputAdditionalOptions(std::ostream& fout,
  50. const char* prefix,
  51. const char* suffix);
  52. void SetConfiguration(const char* config);
  53. private:
  54. cmLocalVisualStudioGenerator* LocalGenerator;
  55. cmLocalVisualStudioGenerator::VSVersion Version;
  56. std::string Configuration;
  57. Tool CurrentTool;
  58. cmVisualStudio10TargetGenerator* TargetGenerator;
  59. bool FortranRuntimeDebug;
  60. bool FortranRuntimeDLL;
  61. bool FortranRuntimeMT;
  62. virtual void StoreUnknownFlag(const char* flag);
  63. };
  64. #endif