cmGlobalNMakeMakefileGenerator.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmGlobalNMakeMakefileGenerator_h
  4. #define cmGlobalNMakeMakefileGenerator_h
  5. #include "cmGlobalUnixMakefileGenerator3.h"
  6. /** \class cmGlobalNMakeMakefileGenerator
  7. * \brief Write a NMake makefiles.
  8. *
  9. * cmGlobalNMakeMakefileGenerator manages nmake build process for a tree
  10. */
  11. class cmGlobalNMakeMakefileGenerator : public cmGlobalUnixMakefileGenerator3
  12. {
  13. public:
  14. cmGlobalNMakeMakefileGenerator(cmake* cm);
  15. static cmGlobalGeneratorFactory* NewFactory()
  16. {
  17. return new cmGlobalGeneratorSimpleFactory<
  18. cmGlobalNMakeMakefileGenerator>();
  19. }
  20. ///! Get the name for the generator.
  21. virtual std::string GetName() const
  22. {
  23. return cmGlobalNMakeMakefileGenerator::GetActualName();
  24. }
  25. static std::string GetActualName() { return "NMake Makefiles"; }
  26. /** Get encoding used by generator for makefile files */
  27. codecvt::Encoding GetMakefileEncoding() const override
  28. {
  29. return codecvt::ANSI;
  30. }
  31. /** Get the documentation entry for this generator. */
  32. static void GetDocumentation(cmDocumentationEntry& entry);
  33. /**
  34. * Try to determine system information such as shared library
  35. * extension, pthreads, byte order etc.
  36. */
  37. virtual void EnableLanguage(std::vector<std::string> const& languages,
  38. cmMakefile*, bool optional);
  39. private:
  40. void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
  41. const char* envVar) const;
  42. };
  43. #endif