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