cmLocalVisualStudioGenerator.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 ComputeLongestObjectDirectory(cmTarget&) const = 0;
  38. virtual void AddCMakeListsRules() = 0;
  39. virtual void ComputeObjectFilenames(
  40. std::map<cmSourceFile const*, std::string>& mapping,
  41. cmGeneratorTarget const* = 0);
  42. protected:
  43. virtual const char* ReportErrorLabel() const;
  44. virtual bool CustomCommandUseLocal() const { return false; }
  45. /** Construct a custom command to make exe import lib dir. */
  46. cmsys::auto_ptr<cmCustomCommand>
  47. MaybeCreateImplibDir(cmTarget& target, const std::string& config,
  48. bool isFortran);
  49. };
  50. #endif