Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Source / cmGlobalBorlandMakefileGenerator.cxx
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #include "cmGlobalBorlandMakefileGenerator.h"
13 #include "cmLocalUnixMakefileGenerator3.h"
14 #include "cmMakefile.h"
15 #include "cmake.h"
16
17 cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
18 {
19   this->EmptyRuleHackDepends = "NUL";
20   this->FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
21   this->ForceUnixPaths = false;
22   this->ToolSupportsColor = true;
23   this->UseLinkScript = false;
24 }
25
26
27 void cmGlobalBorlandMakefileGenerator
28 ::EnableLanguage(std::vector<std::string>const& l,
29                  cmMakefile *mf,
30                  bool optional)
31 {
32   std::string outdir = this->CMakeInstance->GetStartOutputDirectory();
33   mf->AddDefinition("BORLAND", "1");
34   mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
35   mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");
36   this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
37 }
38
39 ///! Create a local generator appropriate to this Global Generator
40 cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
41 {
42   cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
43   lg->SetIncludeDirective("!include");
44   lg->SetWindowsShell(true);
45   lg->SetDefineWindowsNULL(true);
46   lg->SetMakefileVariableSize(32);
47   lg->SetPassMakeflags(true);
48   lg->SetGlobalGenerator(this);
49   lg->SetUnixCD(false);
50   lg->SetMakeCommandEscapeTargetTwice(true);
51   lg->SetBorlandMakeCurlyHack(true);
52   return lg;
53 }
54
55
56 //----------------------------------------------------------------------------
57 void cmGlobalBorlandMakefileGenerator
58 ::GetDocumentation(cmDocumentationEntry& entry)
59 {
60   entry.Name = cmGlobalBorlandMakefileGenerator::GetActualName();
61   entry.Brief = "Generates Borland makefiles.";
62   entry.Full = "";
63 }