cmGlobalWatcomWMakeGenerator.cxx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmGlobalWatcomWMakeGenerator.h"
  4. #include "cmDocumentationEntry.h"
  5. #include "cmMakefile.h"
  6. #include "cmState.h"
  7. #include "cmake.h"
  8. cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm)
  9. : cmGlobalUnixMakefileGenerator3(cm)
  10. {
  11. this->FindMakeProgramFile = "CMakeFindWMake.cmake";
  12. #ifdef _WIN32
  13. this->ForceUnixPaths = false;
  14. #endif
  15. this->ToolSupportsColor = true;
  16. this->NeedSymbolicMark = true;
  17. this->EmptyRuleHackCommand = "@cd .";
  18. #ifdef _WIN32
  19. cm->GetState()->SetWindowsShell(true);
  20. #endif
  21. cm->GetState()->SetWatcomWMake(true);
  22. this->IncludeDirective = "!include";
  23. this->DefineWindowsNULL = true;
  24. this->UnixCD = false;
  25. this->MakeSilentFlag = "-h";
  26. }
  27. void cmGlobalWatcomWMakeGenerator::EnableLanguage(
  28. std::vector<std::string> const& l, cmMakefile* mf, bool optional)
  29. {
  30. // pick a default
  31. mf->AddDefinition("WATCOM", "1");
  32. mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
  33. mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
  34. mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
  35. mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
  36. mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
  37. mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
  38. this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
  39. }
  40. void cmGlobalWatcomWMakeGenerator::GetDocumentation(
  41. cmDocumentationEntry& entry)
  42. {
  43. entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
  44. entry.Brief = "Generates Watcom WMake makefiles.";
  45. }