ENH: mark some vars as advanced (and resort the list)
[cmake.git] / Source / cmGlobalBorlandMakefileGenerator.cxx
blobb846a983092f2b9257930197f5ec7788a51bba5d
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmGlobalBorlandMakefileGenerator.cxx,v $
5 Language: C++
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"
20 #include "cmake.h"
22 void cmGlobalBorlandMakefileGenerator::EnableLanguage(const char*,
23 cmMakefile *mf)
25 // now load the settings
26 if(!mf->GetDefinition("CMAKE_ROOT"))
28 cmSystemTools::Error(
29 "CMAKE_ROOT has not been defined, bad GUI or driver program");
30 return;
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: ";
37 message += outdir;
38 cmSystemTools::Error(message.c_str());
40 if(!this->GetLanguageEnabled("CXX"))
42 std::string fpath =
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);
55 return lg;