cmGlobalWatcomWMakeGenerator.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <iosfwd>
  6. #include <memory>
  7. #include <string>
  8. #include <vector>
  9. #include "cmBuildOptions.h"
  10. #include "cmGlobalGeneratorFactory.h"
  11. #include "cmGlobalUnixMakefileGenerator3.h"
  12. class cmMakefile;
  13. class cmake;
  14. /** \class cmGlobalWatcomWMakeGenerator
  15. * \brief Write a NMake makefiles.
  16. *
  17. * cmGlobalWatcomWMakeGenerator manages nmake build process for a tree
  18. */
  19. class cmGlobalWatcomWMakeGenerator : public cmGlobalUnixMakefileGenerator3
  20. {
  21. public:
  22. cmGlobalWatcomWMakeGenerator(cmake* cm);
  23. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory()
  24. {
  25. return std::unique_ptr<cmGlobalGeneratorFactory>(
  26. new cmGlobalGeneratorSimpleFactory<cmGlobalWatcomWMakeGenerator>());
  27. }
  28. //! Get the name for the generator.
  29. std::string GetName() const override
  30. {
  31. return cmGlobalWatcomWMakeGenerator::GetActualName();
  32. }
  33. static std::string GetActualName() { return "Watcom WMake"; }
  34. /** Get the documentation entry for this generator. */
  35. static cmDocumentationEntry GetDocumentation();
  36. /** Tell the generator about the target system. */
  37. bool SetSystemName(std::string const& s, cmMakefile* mf) override;
  38. /**
  39. * Try to determine system information such as shared library
  40. * extension, pthreads, byte order etc.
  41. */
  42. void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
  43. bool optional) override;
  44. bool AllowNotParallel() const override { return false; }
  45. bool AllowDeleteOnError() const override { return false; }
  46. bool IsGNUMakeJobServerAware() const override { return false; }
  47. std::string GetShortBinaryOutputDir() const override;
  48. protected:
  49. std::vector<GeneratedMakeCommand> GenerateBuildCommand(
  50. std::string const& makeProgram, std::string const& projectName,
  51. std::string const& projectDir, std::vector<std::string> const& targetNames,
  52. std::string const& config, int jobs, bool verbose,
  53. cmBuildOptions buildOptions = cmBuildOptions(),
  54. std::vector<std::string> const& makeOptions = std::vector<std::string>(),
  55. BuildTryCompile isInTryCompile = BuildTryCompile::No) override;
  56. void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
  57. };