cmLocalVisualStudioGenerator.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmLocalVisualStudioGenerator_h
  14. #define cmLocalVisualStudioGenerator_h
  15. #include "cmLocalGenerator.h"
  16. #include <cmsys/auto_ptr.hxx>
  17. class cmSourceFile;
  18. class cmSourceGroup;
  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();
  29. virtual ~cmLocalVisualStudioGenerator();
  30. /** Construct a script from the given list of command lines. */
  31. std::string ConstructScript(const cmCustomCommandLines& commandLines,
  32. const char* workingDirectory,
  33. const char* configName,
  34. bool escapeOldStyle,
  35. bool escapeAllowMakeVars,
  36. const char* newline = "\n");
  37. protected:
  38. /** Construct a custom command to make exe import lib dir. */
  39. cmsys::auto_ptr<cmCustomCommand>
  40. MaybeCreateImplibDir(cmTarget& target, const char* config);
  41. // Safe object file name generation.
  42. void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
  43. bool SourceFileCompiles(const cmSourceFile* sf);
  44. void CountObjectNames(const std::vector<cmSourceGroup>& groups,
  45. std::map<cmStdString, int>& count);
  46. void InsertNeedObjectNames(const std::vector<cmSourceGroup>& groups,
  47. std::map<cmStdString, int>& count);
  48. bool NeedXMLEscape;
  49. std::set<const cmSourceFile*> NeedObjectName;
  50. friend class cmVisualStudio10TargetGenerator;
  51. };
  52. #endif