1
0

cmLocalVisualStudioGenerator.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 cmLocalVisualStudioGenerator_h
  11. #define cmLocalVisualStudioGenerator_h
  12. #include "cmLocalGenerator.h"
  13. #include <cmsys/auto_ptr.hxx>
  14. class cmSourceFile;
  15. class cmSourceGroup;
  16. class cmCustomCommand;
  17. /** \class cmLocalVisualStudioGenerator
  18. * \brief Base class for Visual Studio generators.
  19. *
  20. * cmLocalVisualStudioGenerator provides functionality common to all
  21. * Visual Studio generators.
  22. */
  23. class cmLocalVisualStudioGenerator : public cmLocalGenerator
  24. {
  25. public:
  26. /** Known versions of Visual Studio. */
  27. enum VSVersion
  28. {
  29. VS6 = 60,
  30. VS7 = 70,
  31. VS71 = 71,
  32. VS8 = 80,
  33. VS9 = 90,
  34. VS10 = 100,
  35. VS11 = 110
  36. };
  37. cmLocalVisualStudioGenerator(VSVersion v);
  38. virtual ~cmLocalVisualStudioGenerator();
  39. /** Construct a script from the given list of command lines. */
  40. std::string ConstructScript(cmCustomCommand const& cc,
  41. const char* configName,
  42. const char* newline = "\n");
  43. /** Label to which to jump in a batch file after a failed step in a
  44. sequence of custom commands. */
  45. const char* GetReportErrorLabel() const;
  46. /** Version of Visual Studio. */
  47. VSVersion GetVersion() const { return this->Version; }
  48. virtual std::string ComputeLongestObjectDirectory(cmTarget&) const = 0;
  49. protected:
  50. virtual const char* ReportErrorLabel() const;
  51. virtual bool CustomCommandUseLocal() const { return false; }
  52. /** Construct a custom command to make exe import lib dir. */
  53. cmsys::auto_ptr<cmCustomCommand>
  54. MaybeCreateImplibDir(cmTarget& target, const char* config, bool isFortran);
  55. VSVersion Version;
  56. };
  57. #endif