cmGlobalJOMMakefileGenerator.h 1.9 KB

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