cmLocalGenerator.cxx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include "cmLocalGenerator.h"
  14. #include "cmGlobalGenerator.h"
  15. #include "cmake.h"
  16. #include "cmMakefile.h"
  17. cmLocalGenerator::cmLocalGenerator()
  18. {
  19. m_Makefile = new cmMakefile;
  20. m_Makefile->SetLocalGenerator(this);
  21. }
  22. cmLocalGenerator::~cmLocalGenerator()
  23. {
  24. delete m_Makefile;
  25. }
  26. void cmLocalGenerator::Configure()
  27. {
  28. // find & read the list file
  29. std::string currentStart = m_Makefile->GetStartDirectory();
  30. currentStart += "/CMakeLists.txt";
  31. m_Makefile->ReadListFile(currentStart.c_str());
  32. }
  33. void cmLocalGenerator::SetGlobalGenerator(cmGlobalGenerator *gg)
  34. {
  35. m_GlobalGenerator = gg;
  36. // setup the home directories
  37. m_Makefile->SetHomeDirectory(
  38. gg->GetCMakeInstance()->GetHomeDirectory());
  39. m_Makefile->SetHomeOutputDirectory(
  40. gg->GetCMakeInstance()->GetHomeOutputDirectory());
  41. }
  42. void cmLocalGenerator::ConfigureFinalPass()
  43. {
  44. m_Makefile->ConfigureFinalPass();
  45. }