cmGlobalWatcomWMakeGenerator.cxx 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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->ToolSupportsColorVT100 = false;
  21. }
  22. void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,
  23. cmMakefile *mf)
  24. {
  25. // pick a default
  26. mf->AddDefinition("WATCOM", "1");
  27. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  28. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  29. mf->AddDefinition("CMAKE_WINDOWS_OBJECT_PATH", "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);
  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->SetEchoNeedsQuote(false);
  43. lg->SetDefineWindowsNULL(true);
  44. lg->SetWindowsShell(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::GetDocumentation(cmDocumentationEntry& entry) const
  55. {
  56. entry.name = this->GetName();
  57. entry.brief = "Generates Watcom WMake makefiles.";
  58. entry.full = "";
  59. }