cmGlobalWatcomWMakeGenerator.cxx 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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::EnableLanguage(std::vector<std::string>const& l,
  24. 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::GetDocumentation(cmDocumentationEntry& entry) const
  56. {
  57. entry.name = this->GetName();
  58. entry.brief = "Generates Watcom WMake makefiles.";
  59. entry.full = "";
  60. }