cmGlobalBorlandMakefileGenerator.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 <iosfwd>
  5. #include <memory>
  6. #include <string>
  7. #include <vector>
  8. #include "cmGlobalGeneratorFactory.h"
  9. #include "cmGlobalUnixMakefileGenerator3.h"
  10. class cmLocalGenerator;
  11. class cmMakefile;
  12. class cmake;
  13. /** \class cmGlobalBorlandMakefileGenerator
  14. * \brief Write a Borland makefiles.
  15. *
  16. * cmGlobalBorlandMakefileGenerator manages nmake build process for a tree
  17. */
  18. class cmGlobalBorlandMakefileGenerator : public cmGlobalUnixMakefileGenerator3
  19. {
  20. public:
  21. cmGlobalBorlandMakefileGenerator(cmake* cm);
  22. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory()
  23. {
  24. return std::unique_ptr<cmGlobalGeneratorFactory>(
  25. new cmGlobalGeneratorSimpleFactory<cmGlobalBorlandMakefileGenerator>());
  26. }
  27. //! Get the name for the generator.
  28. std::string GetName() const override
  29. {
  30. return cmGlobalBorlandMakefileGenerator::GetActualName();
  31. }
  32. static std::string GetActualName() { return "Borland Makefiles"; }
  33. /** Get the documentation entry for this generator. */
  34. static cmDocumentationEntry GetDocumentation();
  35. //! Create a local generator appropriate to this Global Generator
  36. std::unique_ptr<cmLocalGenerator> CreateLocalGenerator(
  37. 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 CanEscapeOctothorpe() const override { return true; }
  47. bool IsGNUMakeJobServerAware() const override { return false; }
  48. std::string GetShortBinaryOutputDir() const override;
  49. protected:
  50. std::vector<GeneratedMakeCommand> GenerateBuildCommand(
  51. std::string const& makeProgram, std::string const& projectName,
  52. std::string const& projectDir, std::vector<std::string> const& targetNames,
  53. std::string const& config, int jobs, bool verbose,
  54. cmBuildOptions buildOptions = cmBuildOptions(),
  55. std::vector<std::string> const& makeOptions =
  56. std::vector<std::string>()) override;
  57. void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
  58. };