cmGlobalWatcomWMakeGenerator.cxx 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 "cmGlobalWatcomWMakeGenerator.h"
  11. #include "cmLocalUnixMakefileGenerator3.h"
  12. #include "cmMakefile.h"
  13. cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
  14. {
  15. this->FindMakeProgramFile = "CMakeFindWMake.cmake";
  16. #ifdef _WIN32
  17. this->ForceUnixPaths = false;
  18. #endif
  19. this->ToolSupportsColor = true;
  20. this->NeedSymbolicMark = true;
  21. this->EmptyRuleHackCommand = "@cd .";
  22. #ifdef _WIN32
  23. this->WindowsShell = true;
  24. #endif
  25. this->WatcomWMake = true;
  26. this->IncludeDirective = "!include";
  27. this->DefineWindowsNULL = true;
  28. }
  29. void cmGlobalWatcomWMakeGenerator
  30. ::EnableLanguage(std::vector<std::string>const& l,
  31. cmMakefile *mf,
  32. bool optional)
  33. {
  34. // pick a default
  35. mf->AddDefinition("WATCOM", "1");
  36. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  37. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  38. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  39. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  40. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  41. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  42. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  43. }
  44. ///! Create a local generator appropriate to this Global Generator
  45. cmLocalGenerator *
  46. cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
  47. {
  48. cmLocalUnixMakefileGenerator3* lg
  49. = new cmLocalUnixMakefileGenerator3(this, parent);
  50. lg->SetMakeSilentFlag("-h");
  51. lg->SetIgnoreLibPrefix(true);
  52. lg->SetUnixCD(false);
  53. return lg;
  54. }
  55. //----------------------------------------------------------------------------
  56. void cmGlobalWatcomWMakeGenerator
  57. ::GetDocumentation(cmDocumentationEntry& entry)
  58. {
  59. entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
  60. entry.Brief = "Generates Watcom WMake makefiles.";
  61. }