cmLocalVisualStudioGenerator.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 "cmGlobalVisualStudioGenerator.h"
  14. #include <cmsys/auto_ptr.hxx>
  15. class cmSourceFile;
  16. class cmSourceGroup;
  17. class cmCustomCommand;
  18. class cmCustomCommandGenerator;
  19. /** \class cmLocalVisualStudioGenerator
  20. * \brief Base class for Visual Studio generators.
  21. *
  22. * cmLocalVisualStudioGenerator provides functionality common to all
  23. * Visual Studio generators.
  24. */
  25. class cmLocalVisualStudioGenerator : public cmLocalGenerator
  26. {
  27. public:
  28. cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
  29. virtual ~cmLocalVisualStudioGenerator();
  30. /** Construct a script from the given list of command lines. */
  31. std::string ConstructScript(cmCustomCommandGenerator const& ccg,
  32. const std::string& newline = "\n");
  33. /** Label to which to jump in a batch file after a failed step in a
  34. sequence of custom commands. */
  35. const char* GetReportErrorLabel() const;
  36. cmGlobalVisualStudioGenerator::VSVersion GetVersion() const;
  37. virtual std::string
  38. ComputeLongestObjectDirectory(cmGeneratorTarget const*) const = 0;
  39. virtual void AddCMakeListsRules() = 0;
  40. virtual void ComputeObjectFilenames(
  41. std::map<cmSourceFile const*, std::string>& mapping,
  42. cmGeneratorTarget const* = 0);
  43. protected:
  44. virtual const char* ReportErrorLabel() const;
  45. virtual bool CustomCommandUseLocal() const { return false; }
  46. /** Construct a custom command to make exe import lib dir. */
  47. cmsys::auto_ptr<cmCustomCommand>
  48. MaybeCreateImplibDir(cmTarget& target, const std::string& config,
  49. bool isFortran);
  50. };
  51. #endif