cmGlobalWatcomWMakeGenerator.cxx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmGlobalWatcomWMakeGenerator.h"
  11. #include "cmLocalUnixMakefileGenerator3.h"
  12. #include "cmMakefile.h"
  13. cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm)
  14. : cmGlobalUnixMakefileGenerator3(cm)
  15. {
  16. this->FindMakeProgramFile = "CMakeFindWMake.cmake";
  17. #ifdef _WIN32
  18. this->ForceUnixPaths = false;
  19. #endif
  20. this->ToolSupportsColor = true;
  21. this->NeedSymbolicMark = true;
  22. this->EmptyRuleHackCommand = "@cd .";
  23. #ifdef _WIN32
  24. cm->GetState()->SetWindowsShell(true);
  25. #endif
  26. cm->GetState()->SetWatcomWMake(true);
  27. this->IncludeDirective = "!include";
  28. this->DefineWindowsNULL = true;
  29. this->UnixCD = false;
  30. this->MakeSilentFlag = "-h";
  31. }
  32. void cmGlobalWatcomWMakeGenerator
  33. ::EnableLanguage(std::vector<std::string>const& l,
  34. cmMakefile *mf,
  35. bool optional)
  36. {
  37. // pick a default
  38. mf->AddDefinition("WATCOM", "1");
  39. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  40. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  41. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  42. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  43. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  44. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  45. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  46. }
  47. //----------------------------------------------------------------------------
  48. void cmGlobalWatcomWMakeGenerator
  49. ::GetDocumentation(cmDocumentationEntry& entry)
  50. {
  51. entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
  52. entry.Brief = "Generates Watcom WMake makefiles.";
  53. }