cmGlobalWatcomWMakeGenerator.cxx 2.3 KB

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