cmLocalVisualStudioGenerator.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 <cm_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(
  38. 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. CM_AUTO_PTR<cmCustomCommand> MaybeCreateImplibDir(cmGeneratorTarget* target,
  48. const std::string& config,
  49. bool isFortran);
  50. };
  51. #endif