cmLocalVisualStudioGenerator.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. cmLocalVisualStudioGenerator();
  27. virtual ~cmLocalVisualStudioGenerator();
  28. /** Construct a script from the given list of command lines. */
  29. std::string ConstructScript(cmCustomCommand const& cc,
  30. const char* configName,
  31. const char* newline = "\n");
  32. protected:
  33. /** Construct a custom command to make exe import lib dir. */
  34. cmsys::auto_ptr<cmCustomCommand>
  35. MaybeCreateImplibDir(cmTarget& target, const char* config);
  36. // Safe object file name generation.
  37. void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
  38. bool SourceFileCompiles(const cmSourceFile* sf);
  39. void CountObjectNames(const std::vector<cmSourceGroup>& groups,
  40. std::map<cmStdString, int>& count);
  41. void InsertNeedObjectNames(const std::vector<cmSourceGroup>& groups,
  42. std::map<cmStdString, int>& count);
  43. std::set<const cmSourceFile*> NeedObjectName;
  44. friend class cmVisualStudio10TargetGenerator;
  45. };
  46. #endif