1
0

cmGlobalJOMMakefileGenerator.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 cmGlobalJOMMakefileGenerator_h
  4. #define cmGlobalJOMMakefileGenerator_h
  5. #include <iosfwd>
  6. #include <memory>
  7. #include "cmGlobalUnixMakefileGenerator3.h"
  8. /** \class cmGlobalJOMMakefileGenerator
  9. * \brief Write a JOM makefiles.
  10. *
  11. * cmGlobalJOMMakefileGenerator manages nmake build process for a tree
  12. */
  13. class cmGlobalJOMMakefileGenerator : public cmGlobalUnixMakefileGenerator3
  14. {
  15. public:
  16. cmGlobalJOMMakefileGenerator(cmake* cm);
  17. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory()
  18. {
  19. return std::unique_ptr<cmGlobalGeneratorFactory>(
  20. new cmGlobalGeneratorSimpleFactory<cmGlobalJOMMakefileGenerator>());
  21. }
  22. //! Get the name for the generator.
  23. std::string GetName() const override
  24. {
  25. return cmGlobalJOMMakefileGenerator::GetActualName();
  26. }
  27. // use NMake Makefiles in the name so that scripts/tests that depend on the
  28. // name NMake Makefiles will work
  29. static std::string GetActualName() { return "NMake Makefiles JOM"; }
  30. /** Get the documentation entry for this generator. */
  31. static void GetDocumentation(cmDocumentationEntry& entry);
  32. /**
  33. * Try to determine system information such as shared library
  34. * extension, pthreads, byte order etc.
  35. */
  36. void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
  37. bool optional) override;
  38. protected:
  39. std::vector<GeneratedMakeCommand> GenerateBuildCommand(
  40. const std::string& makeProgram, const std::string& projectName,
  41. const std::string& projectDir, std::vector<std::string> const& targetNames,
  42. const std::string& config, bool fast, int jobs, bool verbose,
  43. std::vector<std::string> const& makeOptions =
  44. std::vector<std::string>()) override;
  45. private:
  46. void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
  47. const char* envVar) const override;
  48. };
  49. #endif