cmGlobalCodeWarriorGenerator.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 cmGlobalCodeWarriorGenerator_h
  14. #define cmGlobalCodeWarriorGenerator_h
  15. #include "cmGlobalGenerator.h"
  16. class cmTarget;
  17. /** \class cmGlobalCodeWarriorGenerator
  18. * \brief Write a Unix makefiles.
  19. *
  20. * cmGlobalCodeWarriorGenerator manages UNIX build process for a tree
  21. */
  22. class cmGlobalCodeWarriorGenerator : public cmGlobalGenerator
  23. {
  24. public:
  25. ///! Get the name for the generator.
  26. virtual const char* GetName() {
  27. return cmGlobalCodeWarriorGenerator::GetActualName();}
  28. static const char* GetActualName() {return "Code Warrior Not Working";}
  29. ///! Create a local generator appropriate to this Global Generator
  30. virtual cmLocalGenerator *CreateLocalGenerator();
  31. /**
  32. * Try to determine system infomation such as shared library
  33. * extension, pthreads, byte order etc.
  34. */
  35. virtual void EnableLanguage(const char*, cmMakefile *mf);
  36. /**
  37. * Try running cmake and building a file. This is used for dynalically
  38. * loaded commands, not as part of the usual build process.
  39. */
  40. virtual int TryCompile(const char *srcdir, const char *bindir,
  41. const char *projectName, const char *targetName,
  42. std::string *output);
  43. /**
  44. * Generate the all required files for building this project/tree. This
  45. * basically creates a series of LocalGenerators for each directory and
  46. * requests that they Generate.
  47. */
  48. virtual void Generate();
  49. /**
  50. * Generate the required files for building this directory. This
  51. * basically creates a single LocalGenerators and
  52. * requests that it Generate.
  53. */
  54. virtual void LocalGenerate();
  55. /**
  56. * Generate the DSW workspace file.
  57. */
  58. virtual void OutputProject();
  59. private:
  60. cmTarget *GetTargetFromName(const char *tgtName);
  61. void WriteProject(std::ostream & fout);
  62. void WriteProjectHeader(std::ostream & fout);
  63. void WriteTargetList(std::ostream & fout);
  64. void WriteTargetOrder(std::ostream & fout);
  65. void WriteGroupList(std::ostream & fout);
  66. void ComputeTargetOrder(std::vector<std::string> &tgtOrder,
  67. const char *tgtName, cmTarget const *tgt);
  68. };
  69. #endif