2001-01-11 22:47:38 +03:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
Program: Insight Segmentation & Registration Toolkit
|
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
2002-01-21 23:30:43 +03:00
|
|
|
Copyright (c) 2002 Insight Consortium. All rights reserved.
|
|
|
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
|
2001-01-11 22:47:38 +03:00
|
|
|
|
2002-01-21 23:30:43 +03:00
|
|
|
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.
|
2001-01-11 22:47:38 +03:00
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
#ifndef cmMakefileGenerator_h
|
|
|
|
#define cmMakefileGenerator_h
|
2001-01-05 19:41:20 +03:00
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
|
|
|
class cmMakefile;
|
2001-01-11 22:47:38 +03:00
|
|
|
class cmClassFile;
|
2001-01-05 19:41:20 +03:00
|
|
|
|
2001-01-11 22:47:38 +03:00
|
|
|
/** \class cmMakefileGenerator
|
|
|
|
* \brief Provide an abstract interface for classes generating makefiles.
|
|
|
|
*
|
|
|
|
* Subclasses of this abstract class generate makefiles for various
|
|
|
|
* platforms.
|
|
|
|
*/
|
2001-01-05 19:41:20 +03:00
|
|
|
class cmMakefileGenerator
|
|
|
|
{
|
|
|
|
public:
|
2002-08-28 22:51:10 +04:00
|
|
|
/**
|
|
|
|
* Try running cmake and building a file. This is used for dynalically
|
|
|
|
* loaded commands, not as part of the usual build process.
|
|
|
|
*/
|
|
|
|
virtual int TryCompile(const char *srcdir, const char *bindir,
|
|
|
|
const char *projectName) = 0;
|
|
|
|
|
2001-09-07 01:28:24 +04:00
|
|
|
///! Get the name for the generator.
|
|
|
|
virtual const char* GetName() = 0;
|
|
|
|
|
|
|
|
///! virtual copy constructor
|
|
|
|
virtual cmMakefileGenerator* CreateObject() = 0;
|
|
|
|
|
|
|
|
///! Set the cmMakefile instance from which to generate the makefile.
|
2001-01-05 19:41:20 +03:00
|
|
|
void SetMakefile(cmMakefile*);
|
2001-01-11 22:47:38 +03:00
|
|
|
|
|
|
|
/**
|
2001-01-18 19:20:24 +03:00
|
|
|
* Generate the makefile using the m_Makefile, m_CustomCommands,
|
2001-01-11 22:47:38 +03:00
|
|
|
* and m_ExtraSourceFiles. All subclasses of cmMakefileGenerator
|
|
|
|
* must implement this method.
|
|
|
|
*/
|
|
|
|
virtual void GenerateMakefile() = 0;
|
|
|
|
|
2001-05-18 19:12:21 +04:00
|
|
|
/**
|
|
|
|
* The local setting indicates that the generator is producing a
|
|
|
|
* fully configured makefile in the current directory. In Microsoft
|
|
|
|
* terms it is producing a DSP file if local is true and a DSW file
|
|
|
|
* if local is false. On UNIX when local is false it skips the
|
|
|
|
* dependecy check and recurses the full tree building the structure
|
|
|
|
*/
|
|
|
|
virtual void SetLocal(bool ) {};
|
|
|
|
|
2001-05-18 23:20:31 +04:00
|
|
|
/**
|
|
|
|
* Try to determine system infomation such as shared library
|
|
|
|
* extension, pthreads, byte order etc.
|
|
|
|
*/
|
2002-04-03 00:43:23 +04:00
|
|
|
virtual void EnableLanguage(const char*) = 0;
|
2001-05-18 23:20:31 +04:00
|
|
|
|
2001-06-04 18:18:03 +04:00
|
|
|
virtual ~cmMakefileGenerator(){};
|
2002-04-03 00:43:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set/Get and Clear the enabled languages.
|
|
|
|
*/
|
|
|
|
static void SetLanguageEnabled(const char*);
|
|
|
|
static bool GetLanguageEnabled(const char*);
|
|
|
|
static void ClearEnabledLanguages();
|
2001-01-05 19:41:20 +03:00
|
|
|
protected:
|
2002-08-21 20:01:55 +04:00
|
|
|
cmMakefile* m_Makefile;
|
|
|
|
private:
|
2002-04-03 00:43:23 +04:00
|
|
|
static std::map<cmStdString, bool> s_LanguageEnabled;
|
2001-01-05 19:41:20 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|