cmGlobalBorlandMakefileGenerator.cxx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmGlobalBorlandMakefileGenerator.h"
  4. #include "cmDocumentationEntry.h"
  5. #include "cmLocalUnixMakefileGenerator3.h"
  6. #include "cmMakefile.h"
  7. #include "cmState.h"
  8. #include "cmake.h"
  9. cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm)
  10. : cmGlobalUnixMakefileGenerator3(cm)
  11. {
  12. this->EmptyRuleHackDepends = "NUL";
  13. this->FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
  14. this->ForceUnixPaths = false;
  15. this->ToolSupportsColor = true;
  16. this->UseLinkScript = false;
  17. cm->GetState()->SetWindowsShell(true);
  18. this->IncludeDirective = "!include";
  19. this->DefineWindowsNULL = true;
  20. this->PassMakeflags = true;
  21. this->UnixCD = false;
  22. }
  23. void cmGlobalBorlandMakefileGenerator::EnableLanguage(
  24. std::vector<std::string> const& l, cmMakefile* mf, bool optional)
  25. {
  26. std::string outdir = this->CMakeInstance->GetHomeOutputDirectory();
  27. mf->AddDefinition("BORLAND", "1");
  28. mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
  29. mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");
  30. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  31. }
  32. ///! Create a local generator appropriate to this Global Generator
  33. cmLocalGenerator* cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
  34. cmMakefile* mf)
  35. {
  36. cmLocalUnixMakefileGenerator3* lg =
  37. new cmLocalUnixMakefileGenerator3(this, mf);
  38. lg->SetMakefileVariableSize(32);
  39. lg->SetMakeCommandEscapeTargetTwice(true);
  40. lg->SetBorlandMakeCurlyHack(true);
  41. return lg;
  42. }
  43. void cmGlobalBorlandMakefileGenerator::GetDocumentation(
  44. cmDocumentationEntry& entry)
  45. {
  46. entry.Name = cmGlobalBorlandMakefileGenerator::GetActualName();
  47. entry.Brief = "Generates Borland makefiles.";
  48. }