Commit d28e483f authored by Ken Martin's avatar Ken Martin

first cut a new arch

parent b8e39b0a
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmGlobalBorlandMakefileGenerator.h"
#include "cmLocalBorlandMakefileGenerator.h"
#include "cmMakefile.h"
#include "cmake.h"
void cmGlobalBorlandMakefileGenerator::EnableLanguage(const char* lang,
cmMakefile *mf)
{
// now load the settings
if(!mf->GetDefinition("CMAKE_ROOT"))
{
cmSystemTools::Error(
"CMAKE_ROOT has not been defined, bad GUI or driver program");
return;
}
std::string outdir = m_CMakeInstance->GetStartOutputDirectory();
if(outdir.find('-') != std::string::npos)
{
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 -.";
message += "\nYour path currently is: ";
message += outdir;
cmSystemTools::Error(message.c_str());
}
if(!this->GetLanguageEnabled("CXX"))
{
std::string fpath =
mf->GetDefinition("CMAKE_ROOT");
fpath += "/Templates/CMakeBorlandWindowsSystemConfig.cmake";
mf->ReadListFile(NULL,fpath.c_str());
this->SetLanguageEnabled("CXX");
}
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
{
cmLocalGenerator *lg = new cmLocalBorlandMakefileGenerator;
lg->SetGlobalGenerator(this);
return lg;
}
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmGlobalBorlandMakefileGenerator_h
#define cmGlobalBorlandMakefileGenerator_h
#include "cmGlobalNMakeMakefileGenerator.h"
/** \class cmGlobalBorlandMakefileGenerator
* \brief Write a Borland makefiles.
*
* cmGlobalBorlandMakefileGenerator manages nmake build process for a tree
*/
class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator
{
public:
///! Get the name for the generator.
virtual const char* GetName() {
return cmGlobalBorlandMakefileGenerator::GetActualName();}
static const char* GetActualName() {return "Borland Makefiles";}
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(const char*,cmMakefile *mf);
};
#endif
This diff is collapsed.
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmBorlandMakefileGenerator_h
#define cmBorlandMakefileGenerator_h
#include "cmLocalNMakeMakefileGenerator.h"
/** \class cmLocalBorlandMakefileGenerator
* \brief Write an Borland makefile.
*
* cmLocalBorlandMakefileGenerator produces a Unix makefile from its
* member m_Makefile.
*/
class cmLocalBorlandMakefileGenerator : public cmLocalNMakeMakefileGenerator
{
public:
///! Set cache only and recurse to false by default.
cmLocalBorlandMakefileGenerator();
virtual ~cmLocalBorlandMakefileGenerator();
protected:
virtual void OutputMakeVariables(std::ostream&);
virtual void OutputBuildObjectFromSource(std::ostream& fout,
const char* shortName,
const cmSourceFile& source,
const char* extraCompileFlags,
bool sharedTarget);
virtual void OutputSharedLibraryRule(std::ostream&, const char* name,
const cmTarget &);
virtual void OutputModuleLibraryRule(std::ostream&, const char* name,
const cmTarget &);
virtual void OutputStaticLibraryRule(std::ostream&, const char* name,
const cmTarget &);
virtual void OutputExecutableRule(std::ostream&, const char* name,
const cmTarget &);
virtual std::string GetOutputExtension(const char* sourceExtension);
///! return true if the two paths are the same (checks short paths)
virtual bool SamePath(const char* path1, const char* path2);
virtual std::string CreateMakeVariable(const char* s, const char* s2);
std::map<cmStdString, cmStdString> m_MakeVariableMap;
std::map<cmStdString, cmStdString> m_ShortMakeVariableMap;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment