cmGlobalWatcomWMakeGenerator.cxx 2.4 KB

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