cmGlobalNMakeMakefileGenerator.cxx 2.0 KB

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