cmGlobalBorlandMakefileGenerator.cxx 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmGlobalBorlandMakefileGenerator.h"
  11. #include "cmLocalUnixMakefileGenerator3.h"
  12. #include "cmMakefile.h"
  13. #include "cmake.h"
  14. cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm)
  15. : cmGlobalUnixMakefileGenerator3(cm)
  16. {
  17. this->EmptyRuleHackDepends = "NUL";
  18. this->FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
  19. this->ForceUnixPaths = false;
  20. this->ToolSupportsColor = true;
  21. this->UseLinkScript = false;
  22. cm->GetState()->SetWindowsShell(true);
  23. this->IncludeDirective = "!include";
  24. this->DefineWindowsNULL = true;
  25. this->PassMakeflags = true;
  26. this->UnixCD = false;
  27. }
  28. void cmGlobalBorlandMakefileGenerator
  29. ::EnableLanguage(std::vector<std::string>const& l,
  30. cmMakefile *mf,
  31. bool optional)
  32. {
  33. std::string outdir = this->CMakeInstance->GetHomeOutputDirectory();
  34. mf->AddDefinition("BORLAND", "1");
  35. mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
  36. mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");
  37. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  38. }
  39. ///! Create a local generator appropriate to this Global Generator
  40. cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
  41. cmState::Snapshot snapshot)
  42. {
  43. cmLocalUnixMakefileGenerator3* lg =
  44. new cmLocalUnixMakefileGenerator3(this, snapshot);
  45. lg->SetMakefileVariableSize(32);
  46. lg->SetMakeCommandEscapeTargetTwice(true);
  47. lg->SetBorlandMakeCurlyHack(true);
  48. return lg;
  49. }
  50. //----------------------------------------------------------------------------
  51. void cmGlobalBorlandMakefileGenerator
  52. ::GetDocumentation(cmDocumentationEntry& entry)
  53. {
  54. entry.Name = cmGlobalBorlandMakefileGenerator::GetActualName();
  55. entry.Brief = "Generates Borland makefiles.";
  56. }