cmGlobalWatcomWMakeGenerator.cxx 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. }
  27. void cmGlobalWatcomWMakeGenerator
  28. ::EnableLanguage(std::vector<std::string>const& l,
  29. cmMakefile *mf,
  30. bool optional)
  31. {
  32. // pick a default
  33. mf->AddDefinition("WATCOM", "1");
  34. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  35. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  36. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  37. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  38. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  39. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  40. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  41. }
  42. ///! Create a local generator appropriate to this Global Generator
  43. cmLocalGenerator *
  44. cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
  45. {
  46. cmLocalUnixMakefileGenerator3* lg
  47. = new cmLocalUnixMakefileGenerator3(this, parent);
  48. lg->SetDefineWindowsNULL(true);
  49. lg->SetMakeSilentFlag("-h");
  50. lg->SetIgnoreLibPrefix(true);
  51. lg->SetPassMakeflags(false);
  52. lg->SetUnixCD(false);
  53. lg->SetIncludeDirective("!include");
  54. return lg;
  55. }
  56. //----------------------------------------------------------------------------
  57. void cmGlobalWatcomWMakeGenerator
  58. ::GetDocumentation(cmDocumentationEntry& entry)
  59. {
  60. entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
  61. entry.Brief = "Generates Watcom WMake makefiles.";
  62. }