cmGlobalNMakeMakefileGenerator.cxx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #include "cmGlobalNMakeMakefileGenerator.h"
  14. #include "cmLocalUnixMakefileGenerator3.h"
  15. #include "cmMakefile.h"
  16. cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
  17. {
  18. this->FindMakeProgramFile = "CMakeNMakeFindMake.cmake";
  19. this->ForceUnixPaths = false;
  20. this->ToolSupportsColor = true;
  21. }
  22. void cmGlobalNMakeMakefileGenerator::EnableLanguage(std::vector<std::string>const& l,
  23. cmMakefile *mf)
  24. {
  25. // pick a default
  26. mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
  27. mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
  28. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf);
  29. }
  30. ///! Create a local generator appropriate to this Global Generator
  31. cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
  32. {
  33. cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
  34. lg->SetEchoNeedsQuote(false);
  35. lg->SetDefineWindowsNULL(true);
  36. lg->SetWindowsShell(true);
  37. lg->SetMakeSilentFlag("/nologo");
  38. lg->SetGlobalGenerator(this);
  39. lg->SetIgnoreLibPrefix(true);
  40. lg->SetPassMakeflags(true);
  41. lg->SetUnixCD(false);
  42. return lg;
  43. }
  44. //----------------------------------------------------------------------------
  45. void cmGlobalNMakeMakefileGenerator::GetDocumentation(cmDocumentationEntry& entry) const
  46. {
  47. entry.name = this->GetName();
  48. entry.brief = "Generates NMake makefiles.";
  49. entry.full = "";
  50. }