cmExtraCodeLiteGenerator.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2004-2009 Kitware, Inc.
  4. Copyright 2004 Alexander Neundorf ([email protected])
  5. Copyright 2013 Eran Ifrah ([email protected])
  6. Distributed under the OSI-approved BSD License (the "License");
  7. see accompanying file Copyright.txt for details.
  8. This software is distributed WITHOUT ANY WARRANTY; without even the
  9. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the License for more information.
  11. ============================================================================*/
  12. #ifndef cmGlobalCodeLiteGenerator_h
  13. #define cmGlobalCodeLiteGenerator_h
  14. #include <cmConfigure.h>
  15. #include "cmExternalMakefileProjectGenerator.h"
  16. #include <map>
  17. #include <set>
  18. #include <string>
  19. #include <vector>
  20. class cmLocalGenerator;
  21. class cmMakefile;
  22. class cmGeneratorTarget;
  23. class cmXMLWriter;
  24. class cmSourceFile;
  25. class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator
  26. {
  27. protected:
  28. std::string ConfigName;
  29. std::string WorkspacePath;
  30. unsigned int CpuCount;
  31. protected:
  32. std::string GetCodeLiteCompilerName(const cmMakefile* mf) const;
  33. std::string GetConfigurationName(const cmMakefile* mf) const;
  34. std::string GetBuildCommand(const cmMakefile* mf) const;
  35. std::string GetCleanCommand(const cmMakefile* mf) const;
  36. std::string GetRebuildCommand(const cmMakefile* mf) const;
  37. std::string GetSingleFileBuildCommand(const cmMakefile* mf) const;
  38. std::vector<std::string> CreateProjectsByTarget(cmXMLWriter* xml);
  39. std::vector<std::string> CreateProjectsByProjectMaps(cmXMLWriter* xml);
  40. std::string CollectSourceFiles(const cmMakefile* makefile,
  41. const cmGeneratorTarget* gt,
  42. std::map<std::string, cmSourceFile*>& cFiles,
  43. std::set<std::string>& otherFiles);
  44. void FindMatchingHeaderfiles(std::map<std::string, cmSourceFile*>& cFiles,
  45. std::set<std::string>& otherFiles);
  46. void CreateProjectSourceEntries(std::map<std::string, cmSourceFile*>& cFiles,
  47. std::set<std::string>& otherFiles,
  48. cmXMLWriter* xml,
  49. const std::string& projectPath,
  50. const cmMakefile* mf,
  51. const std::string& projectType);
  52. public:
  53. cmExtraCodeLiteGenerator();
  54. static cmExternalMakefileProjectGeneratorFactory* GetFactory();
  55. void Generate() CM_OVERRIDE;
  56. void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
  57. void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
  58. const std::string& filename);
  59. void CreateNewProjectFile(const cmGeneratorTarget* lg,
  60. const std::string& filename);
  61. };
  62. #endif