cmLocalGenerator.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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. ///! Get the makefile for this generator
  44. cmMakefile *GetMakefile() {
  45. return this->m_Makefile; };
  46. ///! Get the GlobalGenerator this is associated with
  47. cmGlobalGenerator *GetGlobalGenerator() {
  48. return m_GlobalGenerator; };
  49. ///! Set the Global Generator, done on creation by the GlobalGenerator
  50. void SetGlobalGenerator(cmGlobalGenerator *gg);
  51. protected:
  52. bool m_FromTheTop;
  53. cmMakefile *m_Makefile;
  54. cmGlobalGenerator *m_GlobalGenerator;
  55. };
  56. #endif