cmGlobalWatcomWMakeGenerator.cxx 2.4 KB

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