ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap...
[cmake.git] / Source / cmGlobalVisualStudio7Generator.cxx
blob2de69cf37da84fc5531bfad949d48d5eb3942a26
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalVisualStudio7Generator.cxx,v $
5 Language: C++
6 Date: $Date: 2009-01-21 22:24:54 $
7 Version: $Revision: 1.105 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "windows.h" // this must be first to define GetCurrentDirectory
18 #include "cmGlobalVisualStudio7Generator.h"
19 #include "cmGeneratedFileStream.h"
20 #include "cmLocalVisualStudio7Generator.h"
21 #include "cmMakefile.h"
22 #include "cmake.h"
24 cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator()
26 this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
30 void cmGlobalVisualStudio7Generator
31 ::EnableLanguage(std::vector<std::string>const & lang,
32 cmMakefile *mf, bool optional)
34 mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
35 mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
36 mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
37 mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
38 mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort");
40 this->AddPlatformDefinitions(mf);
42 // Create list of configurations requested by user's cache, if any.
43 this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
44 this->GenerateConfigurations(mf);
46 // if this environment variable is set, then copy it to
47 // a static cache entry. It will be used by
48 // cmLocalGenerator::ConstructScript, to add an extra PATH
49 // to all custom commands. This is because the VS IDE
50 // does not use the environment it is run in, and this allows
51 // for running commands and using dll's that the IDE environment
52 // does not know about.
53 const char* extraPath = cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH");
54 if(extraPath)
56 mf->AddCacheDefinition
57 ("CMAKE_MSVCIDE_RUN_PATH", extraPath,
58 "Saved environment variable CMAKE_MSVCIDE_RUN_PATH",
59 cmCacheManager::STATIC);
64 void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
66 mf->AddDefinition("MSVC70", "1");
69 std::string cmGlobalVisualStudio7Generator
70 ::GenerateBuildCommand(const char* makeProgram,
71 const char *projectName,
72 const char* additionalOptions, const char *targetName,
73 const char* config, bool ignoreErrors, bool)
75 // Ingoring errors is not implemented in visual studio 6
76 (void) ignoreErrors;
78 // now build the test
79 std::string makeCommand =
80 cmSystemTools::ConvertToOutputPath(makeProgram);
81 std::string lowerCaseCommand = makeCommand;
82 cmSystemTools::LowerCase(lowerCaseCommand);
84 // if there are spaces in the makeCommand, assume a full path
85 // and convert it to a path with no spaces in it as the
86 // RunSingleCommand does not like spaces
87 #if defined(_WIN32) && !defined(__CYGWIN__)
88 if(makeCommand.find(' ') != std::string::npos)
90 cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand);
92 #endif
93 makeCommand += " ";
94 makeCommand += projectName;
95 makeCommand += ".sln ";
96 bool clean = false;
97 if ( targetName && strcmp(targetName, "clean") == 0 )
99 clean = true;
100 targetName = "ALL_BUILD";
102 if(clean)
104 makeCommand += "/clean ";
106 else
108 makeCommand += "/build ";
111 if(config && strlen(config))
113 makeCommand += config;
115 else
117 makeCommand += "Debug";
119 makeCommand += " /project ";
121 if (targetName && strlen(targetName))
123 makeCommand += targetName;
125 else
127 makeCommand += "ALL_BUILD";
129 if ( additionalOptions )
131 makeCommand += " ";
132 makeCommand += additionalOptions;
134 return makeCommand;
137 ///! Create a local generator appropriate to this Global Generator
138 cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
140 cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
141 lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
142 lg->SetGlobalGenerator(this);
143 return lg;
146 void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
148 // process the configurations
149 const char* ct
150 = this->CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
151 if ( ct )
153 std::vector<std::string> argsOut;
154 cmSystemTools::ExpandListArgument(ct, argsOut);
155 for(std::vector<std::string>::iterator i = argsOut.begin();
156 i != argsOut.end(); ++i)
158 if(std::find(this->Configurations.begin(),
159 this->Configurations.end(),
160 *i) == this->Configurations.end())
162 this->Configurations.push_back(*i);
166 // default to at least Debug and Release
167 if(this->Configurations.size() == 0)
169 this->Configurations.push_back("Debug");
170 this->Configurations.push_back("Release");
173 // Reset the entry to have a semi-colon separated list.
174 std::string configs = this->Configurations[0];
175 for(unsigned int i=1; i < this->Configurations.size(); ++i)
177 configs += ";";
178 configs += this->Configurations[i];
181 mf->AddCacheDefinition(
182 "CMAKE_CONFIGURATION_TYPES",
183 configs.c_str(),
184 "Semicolon separated list of supported configuration types, "
185 "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
186 "anything else will be ignored.",
187 cmCacheManager::STRING);
190 void cmGlobalVisualStudio7Generator::Generate()
192 // first do the superclass method
193 this->cmGlobalVisualStudioGenerator::Generate();
195 // Now write out the DSW
196 this->OutputSLNFile();
198 // If any solution or project files changed during the generation,
199 // tell Visual Studio to reload them...
200 if(!cmSystemTools::GetErrorOccuredFlag())
202 this->CallVisualStudioMacro(MacroReload);
206 void cmGlobalVisualStudio7Generator
207 ::OutputSLNFile(cmLocalGenerator* root,
208 std::vector<cmLocalGenerator*>& generators)
210 if(generators.size() == 0)
212 return;
214 this->CurrentProject = root->GetMakefile()->GetProjectName();
215 std::string fname = root->GetMakefile()->GetStartOutputDirectory();
216 fname += "/";
217 fname += root->GetMakefile()->GetProjectName();
218 fname += ".sln";
219 cmGeneratedFileStream fout(fname.c_str());
220 fout.SetCopyIfDifferent(true);
221 if(!fout)
223 return;
225 this->WriteSLNFile(fout, root, generators);
226 if (fout.Close())
228 this->FileReplacedDuringGenerate(fname);
232 // output the SLN file
233 void cmGlobalVisualStudio7Generator::OutputSLNFile()
235 std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
236 for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
238 this->OutputSLNFile(it->second[0], it->second);
243 void cmGlobalVisualStudio7Generator::AddAllBuildDepends(
244 cmLocalGenerator* root,
245 cmTarget* target,
246 cmGlobalGenerator::TargetDependSet& originalTargets)
248 // if this is the special ALL_BUILD utility, then
249 // make it depend on every other non UTILITY project.
250 for(cmGlobalGenerator::TargetDependSet::iterator ot =
251 originalTargets.begin(); ot != originalTargets.end(); ++ot)
253 cmTarget* t = const_cast<cmTarget*>(*ot);
254 if(!this->IsExcluded(root, *t))
256 target->AddUtility(t->GetName());
261 void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
262 std::ostream& fout,
263 cmLocalGenerator* root,
264 OrderedTargetDependSet const& projectTargets)
266 // loop over again and write out configurations for each target
267 // in the solution
268 for(OrderedTargetDependSet::const_iterator tt =
269 projectTargets.begin(); tt != projectTargets.end(); ++tt)
271 cmTarget* target = *tt;
272 if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
274 cmCustomCommand cc = target->GetPostBuildCommands()[0];
275 const cmCustomCommandLines& cmds = cc.GetCommandLines();
276 std::string project = cmds[0][0];
277 this->WriteProjectConfigurations(fout, project.c_str(),
278 true);
280 else
282 bool partOfDefaultBuild = this->IsPartOfDefaultBuild(
283 root->GetMakefile()->GetProjectName(), target);
284 const char *vcprojName =
285 target->GetProperty("GENERATOR_FILE_NAME");
286 if (vcprojName)
288 this->WriteProjectConfigurations(fout, vcprojName,
289 partOfDefaultBuild);
296 void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
297 std::ostream& fout,
298 cmLocalGenerator* root,
299 OrderedTargetDependSet const& projectTargets,
300 cmGlobalGenerator::TargetDependSet& originalTargets
303 std::string rootdir = root->GetMakefile()->GetStartOutputDirectory();
304 rootdir += "/";
305 for(OrderedTargetDependSet::const_iterator tt =
306 projectTargets.begin(); tt != projectTargets.end(); ++tt)
308 cmTarget* target = *tt;
309 cmMakefile* mf = target->GetMakefile();
310 // look for the all_build rule and add depends to all
311 // of the original targets (none that were "pulled" into this project)
312 if(mf == root->GetMakefile() &&
313 strcmp(target->GetName(), "ALL_BUILD") == 0)
315 this->AddAllBuildDepends(root, target, originalTargets);
317 // handle external vc project files
318 if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
320 cmCustomCommand cc = target->GetPostBuildCommands()[0];
321 const cmCustomCommandLines& cmds = cc.GetCommandLines();
322 std::string project = cmds[0][0];
323 std::string location = cmds[0][1];
324 this->WriteExternalProject(fout, project.c_str(),
325 location.c_str(), cc.GetDepends());
327 else
329 bool skip = false;
330 // if it is a global target or the check build system target
331 // or the all_build target
332 // then only use the one that is for the root
333 if(target->GetType() == cmTarget::GLOBAL_TARGET
334 || !strcmp(target->GetName(), CMAKE_CHECK_BUILD_SYSTEM_TARGET)
335 || !strcmp(target->GetName(), this->GetAllTargetName()))
337 if(target->GetMakefile() != root->GetMakefile())
339 skip = true;
342 // if not skipping the project then write it into the
343 // solution
344 if(!skip)
346 const char *vcprojName =
347 target->GetProperty("GENERATOR_FILE_NAME");
348 if(vcprojName)
350 cmMakefile* tmf = target->GetMakefile();
351 std::string dir = tmf->GetStartOutputDirectory();
352 dir = root->Convert(dir.c_str(),
353 cmLocalGenerator::START_OUTPUT);
354 this->WriteProject(fout, vcprojName, dir.c_str(),
355 *target);
363 void cmGlobalVisualStudio7Generator::WriteTargetDepends(
364 std::ostream& fout,
365 OrderedTargetDependSet const& projectTargets
368 for(OrderedTargetDependSet::const_iterator tt =
369 projectTargets.begin(); tt != projectTargets.end(); ++tt)
371 cmTarget* target = *tt;
372 cmMakefile* mf = target->GetMakefile();
373 if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
375 cmCustomCommand cc = target->GetPostBuildCommands()[0];
376 const cmCustomCommandLines& cmds = cc.GetCommandLines();
377 std::string name = cmds[0][0];
378 std::vector<std::string> depends = cc.GetDepends();
379 std::vector<std::string>::iterator iter;
380 int depcount = 0;
381 for(iter = depends.begin(); iter != depends.end(); ++iter)
383 std::string guid = this->GetGUID(iter->c_str());
384 if(guid.size() == 0)
386 std::string m = "Target: ";
387 m += target->GetName();
388 m += " depends on unknown target: ";
389 m += iter->c_str();
390 cmSystemTools::Error(m.c_str());
393 fout << "\t\t{" << this->GetGUID(name.c_str())
394 << "}." << depcount << " = {" << guid.c_str() << "}\n";
395 depcount++;
398 else
400 const char *vcprojName =
401 target->GetProperty("GENERATOR_FILE_NAME");
402 if (vcprojName)
404 std::string dir = mf->GetStartDirectory();
405 this->WriteProjectDepends(fout, vcprojName,
406 dir.c_str(), *target);
411 // Write a SLN file to the stream
412 void cmGlobalVisualStudio7Generator
413 ::WriteSLNFile(std::ostream& fout,
414 cmLocalGenerator* root,
415 std::vector<cmLocalGenerator*>& generators)
417 // Write out the header for a SLN file
418 this->WriteSLNHeader(fout);
420 // collect the set of targets for this project by
421 // tracing depends of all targets.
422 // also collect the set of targets that are explicitly
423 // in this project.
424 cmGlobalGenerator::TargetDependSet projectTargets;
425 cmGlobalGenerator::TargetDependSet originalTargets;
426 this->GetTargetSets(projectTargets,
427 originalTargets,
428 root, generators);
429 OrderedTargetDependSet orderedProjectTargets(projectTargets);
430 this->WriteTargetsToSolution(fout, root, orderedProjectTargets,
431 originalTargets);
432 // Write out the configurations information for the solution
433 fout << "Global\n"
434 << "\tGlobalSection(SolutionConfiguration) = preSolution\n";
436 int c = 0;
437 for(std::vector<std::string>::iterator i = this->Configurations.begin();
438 i != this->Configurations.end(); ++i)
440 fout << "\t\tConfigName." << c << " = " << *i << "\n";
441 c++;
443 fout << "\tEndGlobalSection\n";
444 // Write out project(target) depends
445 fout << "\tGlobalSection(ProjectDependencies) = postSolution\n";
446 this->WriteTargetDepends(fout, orderedProjectTargets);
447 fout << "\tEndGlobalSection\n";
449 // Write out the configurations for all the targets in the project
450 fout << "\tGlobalSection(ProjectConfiguration) = postSolution\n";
451 this->WriteTargetConfigurations(fout, root, orderedProjectTargets);
452 fout << "\tEndGlobalSection\n";
454 // Write the footer for the SLN file
455 this->WriteSLNFooter(fout);
458 //----------------------------------------------------------------------------
459 std::string
460 cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path)
462 // Convert to backslashes. Do not use ConvertToOutputPath because
463 // we will add quoting ourselves, and we know these projects always
464 // use windows slashes.
465 std::string d = path;
466 std::string::size_type pos = 0;
467 while((pos = d.find('/', pos)) != d.npos)
469 d[pos++] = '\\';
471 return d;
474 // Write a dsp file into the SLN file,
475 // Note, that dependencies from executables to
476 // the libraries it uses are also done here
477 void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
478 const char* dspname,
479 const char* dir, cmTarget& target)
481 // check to see if this is a fortran build
482 const char* ext = ".vcproj";
483 const char* project =
484 "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
485 if(this->TargetIsFortranOnly(target))
487 ext = ".vfproj";
488 project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
491 fout << project
492 << dspname << "\", \""
493 << this->ConvertToSolutionPath(dir)
494 << "\\" << dspname << ext << "\", \"{"
495 << this->GetGUID(dspname) << "}\"\nEndProject\n";
500 // Write a dsp file into the SLN file,
501 // Note, that dependencies from executables to
502 // the libraries it uses are also done here
503 void
504 cmGlobalVisualStudio7Generator
505 ::WriteProjectDepends(std::ostream& fout,
506 const char* dspname,
507 const char*, cmTarget& target)
509 int depcount = 0;
510 // insert Begin Project Dependency Project_Dep_Name project stuff here
511 if (target.GetType() != cmTarget::STATIC_LIBRARY)
513 cmTarget::LinkLibraryVectorType::const_iterator j, jend;
514 j = target.GetLinkLibraries().begin();
515 jend = target.GetLinkLibraries().end();
516 for(;j!= jend; ++j)
518 if(j->first != dspname)
520 // is the library part of this SLN ? If so add dependency
521 if(this->FindTarget(0, j->first.c_str()))
523 std::string guid = this->GetGUID(j->first.c_str());
524 if(guid.size() == 0)
526 std::string m = "Target: ";
527 m += dspname;
528 m += " depends on unknown target: ";
529 m += j->first.c_str();
530 cmSystemTools::Error(m.c_str());
532 fout << "\t\t{" << this->GetGUID(dspname) << "}."
533 << depcount << " = {" << guid << "}\n";
534 depcount++;
540 std::set<cmStdString>::const_iterator i, end;
541 // write utility dependencies.
542 i = target.GetUtilities().begin();
543 end = target.GetUtilities().end();
544 for(;i!= end; ++i)
546 if(*i != dspname)
548 std::string name = this->GetUtilityForTarget(target, i->c_str());
549 std::string guid = this->GetGUID(name.c_str());
550 if(guid.size() == 0)
552 std::string m = "Target: ";
553 m += dspname;
554 m += " depends on unknown target: ";
555 m += name.c_str();
556 cmSystemTools::Error(m.c_str());
559 fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {"
560 << guid << "}\n";
561 depcount++;
567 // Write a dsp file into the SLN file, Note, that dependencies from
568 // executables to the libraries it uses are also done here
569 void cmGlobalVisualStudio7Generator
570 ::WriteProjectConfigurations(std::ostream& fout, const char* name,
571 bool partOfDefaultBuild)
573 std::string guid = this->GetGUID(name);
574 for(std::vector<std::string>::iterator i = this->Configurations.begin();
575 i != this->Configurations.end(); ++i)
577 fout << "\t\t{" << guid << "}." << *i
578 << ".ActiveCfg = " << *i << "|Win32\n";
579 if(partOfDefaultBuild)
581 fout << "\t\t{" << guid << "}." << *i
582 << ".Build.0 = " << *i << "|Win32\n";
589 // Write a dsp file into the SLN file,
590 // Note, that dependencies from executables to
591 // the libraries it uses are also done here
592 void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout,
593 const char* name,
594 const char* location,
595 const std::vector<std::string>&)
597 std::cout << "WriteExternalProject vs7\n";
598 std::string d = cmSystemTools::ConvertToOutputPath(location);
599 fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
600 << name << "\", \""
601 << this->ConvertToSolutionPath(location) << "\", \"{"
602 << this->GetGUID(name)
603 << "}\"\n";
604 fout << "EndProject\n";
609 // Standard end of dsw file
610 void cmGlobalVisualStudio7Generator::WriteSLNFooter(std::ostream& fout)
612 fout << "\tGlobalSection(ExtensibilityGlobals) = postSolution\n"
613 << "\tEndGlobalSection\n"
614 << "\tGlobalSection(ExtensibilityAddIns) = postSolution\n"
615 << "\tEndGlobalSection\n"
616 << "EndGlobal\n";
620 // ouput standard header for dsw file
621 void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout)
623 fout << "Microsoft Visual Studio Solution File, Format Version 7.00\n";
626 std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name)
628 std::string guidStoreName = name;
629 guidStoreName += "_GUID_CMAKE";
630 const char* storedGUID =
631 this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str());
632 if(storedGUID)
634 return std::string(storedGUID);
636 cmSystemTools::Error("Unknown Target referenced : ",
637 name);
638 return "";
642 void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
644 std::string guidStoreName = name;
645 guidStoreName += "_GUID_CMAKE";
646 if(this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()))
648 return;
650 std::string ret;
651 UUID uid;
652 unsigned char *uidstr;
653 UuidCreate(&uid);
654 UuidToString(&uid,&uidstr);
655 ret = reinterpret_cast<char*>(uidstr);
656 RpcStringFree(&uidstr);
657 ret = cmSystemTools::UpperCase(ret);
658 this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(),
659 ret.c_str(), "Stored GUID",
660 cmCacheManager::INTERNAL);
663 std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
665 return &this->Configurations;
668 //----------------------------------------------------------------------------
669 void cmGlobalVisualStudio7Generator
670 ::GetDocumentation(cmDocumentationEntry& entry) const
672 entry.Name = this->GetName();
673 entry.Brief = "Generates Visual Studio .NET 2002 project files.";
674 entry.Full = "";
677 // make sure "special" targets have GUID's
678 void cmGlobalVisualStudio7Generator::Configure()
680 cmGlobalGenerator::Configure();
681 this->CreateGUID("ALL_BUILD");
682 this->CreateGUID("INSTALL");
683 this->CreateGUID("RUN_TESTS");
684 this->CreateGUID("EDIT_CACHE");
685 this->CreateGUID("REBUILD_CACHE");
686 this->CreateGUID("PACKAGE");
689 //----------------------------------------------------------------------------
690 void
691 cmGlobalVisualStudio7Generator
692 ::AppendDirectoryForConfig(const char* prefix,
693 const char* config,
694 const char* suffix,
695 std::string& dir)
697 if(config)
699 dir += prefix;
700 dir += config;
701 dir += suffix;
705 bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
706 cmTarget* target)
708 if(target->GetPropertyAsBool("EXCLUDE_FROM_DEFAULT_BUILD"))
710 return false;
712 // if it is a utilitiy target then only make it part of the
713 // default build if another target depends on it
714 int type = target->GetType();
715 if (type == cmTarget::GLOBAL_TARGET)
717 return false;
719 if(type == cmTarget::UTILITY)
721 return this->IsDependedOn(project, target);
723 // default is to be part of the build
724 return true;
727 //----------------------------------------------------------------------------
728 bool
729 cmGlobalVisualStudio7Generator::TargetCompare
730 ::operator()(cmTarget const* l, cmTarget const* r)
732 // Make sure ALL_BUILD is first so it is the default active project.
733 if(strcmp(r->GetName(), "ALL_BUILD") == 0)
735 return false;
737 if(strcmp(l->GetName(), "ALL_BUILD") == 0)
739 return true;
741 return strcmp(l->GetName(), r->GetName()) < 0;
744 //----------------------------------------------------------------------------
745 cmGlobalVisualStudio7Generator::OrderedTargetDependSet
746 ::OrderedTargetDependSet(cmGlobalGenerator::TargetDependSet const& targets)
748 for(cmGlobalGenerator::TargetDependSet::const_iterator ti =
749 targets.begin(); ti != targets.end(); ++ti)
751 this->insert(*ti);
755 //----------------------------------------------------------------------------
756 static cmVS7FlagTable cmVS7ExtraFlagTable[] =
758 // Precompiled header and related options. Note that the
759 // UsePrecompiledHeader entries are marked as "Continue" so that the
760 // corresponding PrecompiledHeaderThrough entry can be found.
761 {"UsePrecompiledHeader", "YX", "Automatically Generate", "2",
762 cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
763 {"PrecompiledHeaderThrough", "YX", "Precompiled Header Name", "",
764 cmVS7FlagTable::UserValueRequired},
765 {"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "3",
766 cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
767 {"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "",
768 cmVS7FlagTable::UserValueRequired},
769 {"WholeProgramOptimization", "LTCG", "WholeProgramOptimization", "TRUE", 0},
771 // Exception handling mode. If no entries match, it will be FALSE.
772 {"ExceptionHandling", "GX", "enable c++ exceptions", "TRUE", 0},
773 {"ExceptionHandling", "EHsc", "enable c++ exceptions", "TRUE", 0},
774 // The EHa option does not have an IDE setting. Let it go to false,
775 // and have EHa passed on the command line by leaving out the table
776 // entry.
778 {0,0,0,0,0}
780 cmVS7FlagTable const* cmGlobalVisualStudio7Generator::GetExtraFlagTableVS7()
782 return cmVS7ExtraFlagTable;