cmLocalGenerator.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 cmLocalGenerator_h
  14. #define cmLocalGenerator_h
  15. #include "cmStandardIncludes.h"
  16. class cmMakefile;
  17. class cmGlobalGenerator;
  18. /** \class cmLocalGenerator
  19. * \brief Create required build files for a directory.
  20. *
  21. * Subclasses of this abstract class generate makefiles, DSP, etc for various
  22. * platforms. This class should never be constructued directly. A
  23. * GlobalGenerator will create it and invoke the appropriate commands on it.
  24. */
  25. class cmLocalGenerator
  26. {
  27. public:
  28. cmLocalGenerator();
  29. virtual ~cmLocalGenerator();
  30. /**
  31. * Generate the makefile for this directory. fromTheTop indicates if this
  32. * is being invoked as part of a global Generate or specific to this
  33. * directory. The difference is that when done from the Top we might skip
  34. * some steps to save time, such as dependency generation for the
  35. * makefiles. This is done by a direct invocation from make.
  36. */
  37. virtual void Generate(bool /* fromTheTop */) {};
  38. /**
  39. * Process the CMakeLists files for this directory to fill in the
  40. * m_Makefile ivar
  41. */
  42. virtual void Configure();
  43. /**
  44. * Perform any final calculations prior to generation
  45. */
  46. virtual void ConfigureFinalPass();
  47. ///! Get the makefile for this generator
  48. cmMakefile *GetMakefile() {
  49. return this->m_Makefile; };
  50. ///! Get the GlobalGenerator this is associated with
  51. cmGlobalGenerator *GetGlobalGenerator() {
  52. return m_GlobalGenerator; };
  53. ///! Set the Global Generator, done on creation by the GlobalGenerator
  54. void SetGlobalGenerator(cmGlobalGenerator *gg);
  55. protected:
  56. bool m_FromTheTop;
  57. cmMakefile *m_Makefile;
  58. cmGlobalGenerator *m_GlobalGenerator;
  59. };
  60. #endif