cmVisualStudioGeneratorOptions.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // Write options to output.
  45. void OutputPreprocessorDefinitions(std::ostream& fout,
  46. const char* prefix,
  47. const char* suffix,
  48. const std::string& lang);
  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. cmLocalVisualStudioGenerator* LocalGenerator;
  56. cmLocalVisualStudioGenerator::VSVersion Version;
  57. std::string Configuration;
  58. Tool CurrentTool;
  59. cmVisualStudio10TargetGenerator* TargetGenerator;
  60. bool FortranRuntimeDebug;
  61. bool FortranRuntimeDLL;
  62. bool FortranRuntimeMT;
  63. virtual void StoreUnknownFlag(const char* flag);
  64. };
  65. #endif