~ubuntu-branches/ubuntu/precise/cmake/precise-updates

« back to all changes in this revision

Viewing changes to Source/cmVisualStudioGeneratorOptions.cxx

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-01-17 23:04:07 UTC
  • mfrom: (1.13.6)
  • Revision ID: package-import@ubuntu.com-20120117230407-14cdb6g0mxmh29bl
Tags: 2.8.7-0ubuntu1
* New upstream release
  - Add increase_ctest_test_timeout.diff to increase timeout period
    of a test

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
//----------------------------------------------------------------------------
27
27
cmVisualStudioGeneratorOptions
28
 
::cmVisualStudioGeneratorOptions(cmLocalGenerator* lg,
29
 
                                 int version,
 
28
::cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
30
29
                                 Tool tool,
31
30
                                 cmVS7FlagTable const* table,
32
31
                                 cmVS7FlagTable const* extraTable,
33
32
                                 cmVisualStudio10TargetGenerator* g):
34
33
  cmIDEOptions(),
35
 
  LocalGenerator(lg), Version(version), CurrentTool(tool),
 
34
  LocalGenerator(lg), Version(lg->GetVersion()), CurrentTool(tool),
36
35
  TargetGenerator(g)
37
36
{
38
37
  // Store the given flag tables.
61
60
  // remove the flag we need to override the IDE default of on.
62
61
  switch (this->Version)
63
62
    {
64
 
    case 7:
65
 
    case 71:
 
63
    case cmLocalVisualStudioGenerator::VS7:
 
64
    case cmLocalVisualStudioGenerator::VS71:
66
65
      this->FlagMap["ExceptionHandling"] = "FALSE";
67
66
      break;
68
 
    case 10:
 
67
    case cmLocalVisualStudioGenerator::VS10:
 
68
    case cmLocalVisualStudioGenerator::VS11:
69
69
      // by default VS puts <ExceptionHandling></ExceptionHandling> empty
70
70
      // for a project, to make our projects look the same put a new line
71
71
      // and space over for the closing </ExceptionHandling> as the default
86
86
  // to the generated project to disable logo suppression.  Otherwise
87
87
  // the GUI default is to enable suppression.
88
88
  //
89
 
  // Avoid this on Visual Studio 10 (and later!) because it results in:
 
89
  // On Visual Studio 10 (and later!), the value of this attribute should be
 
90
  // an empty string, instead of "FALSE", in order to avoid a warning:
90
91
  //   "cl ... warning D9035: option 'nologo-' has been deprecated"
91
92
  //
92
93
  if(verbose &&
93
 
     this->Version != 10 &&
94
94
     this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end())
95
95
    {
96
 
    this->FlagMap["SuppressStartupBanner"] = "FALSE";
 
96
    this->FlagMap["SuppressStartupBanner"] =
 
97
      this->Version < cmLocalVisualStudioGenerator::VS10 ? "FALSE" : "";
97
98
    }
98
99
}
99
100
 
211
212
    {
212
213
    return;
213
214
    }
214
 
  if(this->Version == 10)
 
215
  if(this->Version >= cmLocalVisualStudioGenerator::VS10)
215
216
    {
216
217
    // if there are configuration specifc flags, then
217
218
    // use the configuration specific tag for PreprocessorDefinitions
239
240
    {
240
241
    // Escape the definition for the compiler.
241
242
    std::string define;
242
 
    if(this->Version != 10)
 
243
    if(this->Version < cmLocalVisualStudioGenerator::VS10)
243
244
      {
244
245
      define =
245
246
        this->LocalGenerator->EscapeForShell(di->c_str(), true);
249
250
      define = *di;
250
251
      }
251
252
    // Escape this flag for the IDE.
252
 
    if(this->Version == 10)
 
253
    if(this->Version >= cmLocalVisualStudioGenerator::VS10)
253
254
      {
254
255
      define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str());
255
256
 
266
267
    fout << sep << define;
267
268
    sep = ";";
268
269
    }
269
 
  if(this->Version == 10)
 
270
  if(this->Version >= cmLocalVisualStudioGenerator::VS10)
270
271
    {
271
272
    fout <<  ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix;
272
273
    }
281
282
cmVisualStudioGeneratorOptions
282
283
::OutputFlagMap(std::ostream& fout, const char* indent)
283
284
{
284
 
  if(this->Version == 10)
 
285
  if(this->Version >= cmLocalVisualStudioGenerator::VS10)
285
286
    {
286
287
    for(std::map<cmStdString, cmStdString>::iterator m = this->FlagMap.begin();
287
288
        m != this->FlagMap.end(); ++m)
326
327
{
327
328
  if(!this->FlagString.empty())
328
329
    {
329
 
    if(this->Version == 10)
 
330
    if(this->Version >= cmLocalVisualStudioGenerator::VS10)
330
331
      { 
331
332
      fout << prefix;
332
333
      if(this->Configuration.size())