1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmGlobalBorlandMakefileGenerator.cxx,v $
6 Date: $Date: 2002-09-08 01:18:09 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmGlobalBorlandMakefileGenerator.h"
18 #include "cmLocalBorlandMakefileGenerator.h"
19 #include "cmMakefile.h"
22 void cmGlobalBorlandMakefileGenerator::EnableLanguage(const char*,
25 // now load the settings
26 if(!mf
->GetDefinition("CMAKE_ROOT"))
29 "CMAKE_ROOT has not been defined, bad GUI or driver program");
32 std::string outdir
= m_CMakeInstance
->GetStartOutputDirectory();
33 if(outdir
.find('-') != std::string::npos
)
35 std::string message
= "The Borland command line tools do not support path names that have - in them. Please re-name your output directory and use _ instead of -.";
36 message
+= "\nYour path currently is: ";
38 cmSystemTools::Error(message
.c_str());
40 if(!this->GetLanguageEnabled("CXX"))
43 mf
->GetDefinition("CMAKE_ROOT");
44 fpath
+= "/Templates/CMakeBorlandWindowsSystemConfig.cmake";
45 mf
->ReadListFile(NULL
,fpath
.c_str());
46 this->SetLanguageEnabled("CXX");
50 ///! Create a local generator appropriate to this Global Generator
51 cmLocalGenerator
*cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
53 cmLocalGenerator
*lg
= new cmLocalBorlandMakefileGenerator
;
54 lg
->SetGlobalGenerator(this);