cmGlobalVisualStudio8Generator.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 cmGlobalVisualStudio8Generator_h
  11. #define cmGlobalVisualStudio8Generator_h
  12. #include "cmGlobalVisualStudio71Generator.h"
  13. /** \class cmGlobalVisualStudio8Generator
  14. * \brief Write a Unix makefiles.
  15. *
  16. * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
  17. */
  18. class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
  19. {
  20. public:
  21. cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
  22. const std::string& platformName);
  23. static cmGlobalGeneratorFactory* NewFactory();
  24. ///! Get the name for the generator.
  25. virtual std::string GetName() const {return this->Name;}
  26. /** Get the documentation entry for this generator. */
  27. static void GetDocumentation(cmDocumentationEntry& entry);
  28. virtual void EnableLanguage(std::vector<std::string>const& languages,
  29. cmMakefile *, bool optional);
  30. virtual void AddPlatformDefinitions(cmMakefile* mf);
  31. virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf);
  32. /**
  33. * Override Configure and Generate to add the build-system check
  34. * target.
  35. */
  36. virtual void Configure();
  37. /**
  38. * Where does this version of Visual Studio look for macros for the
  39. * current user? Returns the empty string if this version of Visual
  40. * Studio does not implement support for VB macros.
  41. */
  42. virtual std::string GetUserMacrosDirectory();
  43. /**
  44. * What is the reg key path to "vsmacros" for this version of Visual
  45. * Studio?
  46. */
  47. virtual std::string GetUserMacrosRegKeyBase();
  48. /** Return true if the target project file should have the option
  49. LinkLibraryDependencies and link to .sln dependencies. */
  50. virtual bool NeedLinkLibraryDependencies(cmTarget& target);
  51. /** Return true if building for Windows CE */
  52. virtual bool TargetsWindowsCE() const {
  53. return !this->WindowsCEVersion.empty(); }
  54. protected:
  55. virtual void AddExtraIDETargets();
  56. virtual const char* GetIDEVersion() { return "8.0"; }
  57. virtual std::string FindDevEnvCommand();
  58. virtual bool VSLinksDependencies() const { return false; }
  59. bool AddCheckTarget();
  60. /** Return true if the configuration needs to be deployed */
  61. virtual bool NeedsDeploy(cmState::TargetType type) const;
  62. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  63. virtual void WriteSLNHeader(std::ostream& fout);
  64. virtual void WriteSolutionConfigurations(
  65. std::ostream& fout, std::vector<std::string> const& configs);
  66. virtual void WriteProjectConfigurations(
  67. std::ostream& fout, const std::string& name, cmState::TargetType type,
  68. std::vector<std::string> const& configs,
  69. const std::set<std::string>& configsPartOfDefaultBuild,
  70. const std::string& platformMapping = "");
  71. virtual bool ComputeTargetDepends();
  72. virtual void WriteProjectDepends(std::ostream& fout,
  73. const std::string& name,
  74. const char* path,
  75. const cmGeneratorTarget *t);
  76. std::string Name;
  77. std::string WindowsCEVersion;
  78. private:
  79. class Factory;
  80. friend class Factory;
  81. };
  82. #endif