cmGlobalWatcomWMakeGenerator.cxx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 "cmGlobalWatcomWMakeGenerator.h"
  14. #include "cmLocalUnixMakefileGenerator3.h"
  15. #include "cmMakefile.h"
  16. cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
  17. {
  18. this->FindMakeProgramFile = "CMakeFindWMake.cmake";
  19. this->ForceUnixPaths = false;
  20. this->ToolSupportsColor = true;
  21. this->EmptyCommandsHack = "@cd .";
  22. }
  23. void cmGlobalWatcomWMakeGenerator
  24. ::EnableLanguage(std::vector<std::string>const& l, cmMakefile *mf)
  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_WINDOWS_OBJECT_PATH", "1");
  31. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  32. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  33. mf->AddDefinition("CMAKE_NO_QUOTED_OBJECTS", "1");
  34. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  35. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  36. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf);
  37. }
  38. ///! Create a local generator appropriate to this Global Generator
  39. cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
  40. {
  41. cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
  42. lg->SetSilentNoColon(true);
  43. lg->SetEchoNeedsQuote(false);
  44. lg->SetDefineWindowsNULL(true);
  45. lg->SetWindowsShell(true);
  46. lg->SetMakeSilentFlag("-s -h");
  47. lg->SetGlobalGenerator(this);
  48. lg->SetIgnoreLibPrefix(true);
  49. lg->SetPassMakeflags(false);
  50. lg->SetUnixCD(false);
  51. lg->SetIncludeDirective("!include");
  52. return lg;
  53. }
  54. //----------------------------------------------------------------------------
  55. void cmGlobalWatcomWMakeGenerator
  56. ::GetDocumentation(cmDocumentationEntry& entry) const
  57. {
  58. entry.name = this->GetName();
  59. entry.brief = "Generates Watcom WMake makefiles.";
  60. entry.full = "";
  61. }