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. }
  23. void cmGlobalWatcomWMakeGenerator
  24. ::EnableLanguage(std::vector<std::string>const& l,
  25. cmMakefile *mf,
  26. bool optional)
  27. {
  28. // pick a default
  29. mf->AddDefinition("WATCOM", "1");
  30. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  31. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  32. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  33. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  34. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  35. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  36. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  37. }
  38. ///! Create a local generator appropriate to this Global Generator
  39. cmLocalGenerator *
  40. cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
  41. {
  42. cmLocalUnixMakefileGenerator3* lg
  43. = new cmLocalUnixMakefileGenerator3(this, parent);
  44. lg->SetDefineWindowsNULL(true);
  45. #ifdef _WIN32
  46. lg->SetWindowsShell(true);
  47. #endif
  48. lg->SetWatcomWMake(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. }