cmGlobalNMakeMakefileGenerator.cxx 1.9 KB

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