cmGlobalNMakeMakefileGenerator.cxx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 "cmGlobalNMakeMakefileGenerator.h"
  14. #include "cmLocalNMakeMakefileGenerator.h"
  15. #include "cmMakefile.h"
  16. void cmGlobalNMakeMakefileGenerator::EnableLanguage(const char*,
  17. cmMakefile *mf)
  18. {
  19. // now load the settings
  20. if(!mf->GetDefinition("CMAKE_ROOT"))
  21. {
  22. cmSystemTools::Error(
  23. "CMAKE_ROOT has not been defined, bad GUI or driver program");
  24. return;
  25. }
  26. if(!this->GetLanguageEnabled("CXX"))
  27. {
  28. std::string fpath =
  29. mf->GetDefinition("CMAKE_ROOT");
  30. fpath += "/Templates/CMakeNMakeWindowsSystemConfig.cmake";
  31. mf->ReadListFile(NULL,fpath.c_str());
  32. this->SetLanguageEnabled("CXX");
  33. }
  34. }
  35. ///! Create a local generator appropriate to this Global Generator
  36. cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
  37. {
  38. cmLocalGenerator *lg = new cmLocalNMakeMakefileGenerator;
  39. lg->SetGlobalGenerator(this);
  40. return lg;
  41. }