1
0

cmVisualStudioGeneratorOptions.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 "cmLocalGenerator.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(cmLocalGenerator* lg,
  28. int version,
  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();
  42. bool IsDebug();
  43. // Write options to output.
  44. void OutputPreprocessorDefinitions(std::ostream& fout,
  45. const char* prefix,
  46. const char* suffix);
  47. void OutputFlagMap(std::ostream& fout, const char* indent);
  48. void OutputAdditionalOptions(std::ostream& fout,
  49. const char* prefix,
  50. const char* suffix);
  51. void SetConfiguration(const char* config);
  52. private:
  53. cmLocalGenerator* LocalGenerator;
  54. int Version;
  55. std::string Configuration;
  56. Tool CurrentTool;
  57. cmVisualStudio10TargetGenerator* TargetGenerator;
  58. bool FortranRuntimeDebug;
  59. bool FortranRuntimeDLL;
  60. bool FortranRuntimeMT;
  61. virtual void StoreUnknownFlag(const char* flag);
  62. };
  63. #endif