cmGlobalBorlandMakefileGenerator.cxx 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmGlobalBorlandMakefileGenerator.h"
  14. #include "cmLocalUnixMakefileGenerator.h"
  15. #include "cmMakefile.h"
  16. #include "cmake.h"
  17. cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
  18. {
  19. m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
  20. m_ForceUnixPaths = false;
  21. }
  22. void cmGlobalBorlandMakefileGenerator::EnableLanguage(const char* l,
  23. cmMakefile *mf)
  24. {
  25. // now load the settings
  26. if(!mf->GetDefinition("CMAKE_ROOT"))
  27. {
  28. cmSystemTools::Error(
  29. "CMAKE_ROOT has not been defined, bad GUI or driver program");
  30. return;
  31. }
  32. std::string outdir = m_CMakeInstance->GetStartOutputDirectory();
  33. mf->AddDefinition("BORLAND", "1");
  34. mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
  35. mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");
  36. this->cmGlobalUnixMakefileGenerator::EnableLanguage(l, mf);
  37. }
  38. ///! Create a local generator appropriate to this Global Generator
  39. cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
  40. {
  41. cmLocalUnixMakefileGenerator *lg = new cmLocalUnixMakefileGenerator;
  42. lg->SetIncludeDirective("!include");
  43. lg->SetWindowsShell(true);
  44. lg->SetMakefileVariableSize(32);
  45. lg->SetPassMakeflags(true);
  46. lg->SetGlobalGenerator(this);
  47. return lg;
  48. }
  49. //----------------------------------------------------------------------------
  50. void cmGlobalBorlandMakefileGenerator::GetDocumentation(cmDocumentationEntry& entry) const
  51. {
  52. entry.name = this->GetName();
  53. entry.brief = "Generates Borland makefiles.";
  54. entry.full = "";
  55. }