Merge topic 'generator-factory'
75ebebc
VS: Remove platform specific generator files8b62080
VS: Remove EnableLanguage from platform-specific generators5bdf011
VS: Remove GetPlatformName from platform-specific generators8d42ab4
VS: Fix ArchitectureId of Visual Studio 10 IA64 generator6f439b3
VS: Remove AddPlatformDefinitions from platform-specific generators5170a88
Make cmGlobalGenerator::GetDocumentation() a static function04ff866
Allow a GeneratorFactory handling of more than one generator984ebc3
Search generator in cmake::ExtraGenerators before in cmake::Generators30a6950
Add cmGlobalGeneratorFactory::GetGenerators()e8f8414
Introduce the abstract class cmGlobalGeneratorFactory
This commit is contained in:
commit
d82200df26
|
@ -201,6 +201,7 @@ set(SRCS
|
|||
cmGeneratorTarget.h
|
||||
cmGlobalGenerator.cxx
|
||||
cmGlobalGenerator.h
|
||||
cmGlobalGeneratorFactory.h
|
||||
cmGlobalUnixMakefileGenerator3.cxx
|
||||
cmGlobalUnixMakefileGenerator3.h
|
||||
cmGraphAdjacencyList.h
|
||||
|
@ -330,12 +331,6 @@ if (WIN32)
|
|||
cmGlobalVisualStudio8Generator.h
|
||||
cmGlobalVisualStudio9Generator.cxx
|
||||
cmGlobalVisualStudio9Generator.h
|
||||
cmGlobalVisualStudio8Win64Generator.cxx
|
||||
cmGlobalVisualStudio8Win64Generator.h
|
||||
cmGlobalVisualStudio9Win64Generator.cxx
|
||||
cmGlobalVisualStudio9Win64Generator.h
|
||||
cmGlobalVisualStudio9IA64Generator.cxx
|
||||
cmGlobalVisualStudio9IA64Generator.h
|
||||
cmVisualStudioGeneratorOptions.h
|
||||
cmVisualStudioGeneratorOptions.cxx
|
||||
cmVisualStudio10TargetGenerator.h
|
||||
|
@ -344,16 +339,8 @@ if (WIN32)
|
|||
cmLocalVisualStudio10Generator.h
|
||||
cmGlobalVisualStudio10Generator.h
|
||||
cmGlobalVisualStudio10Generator.cxx
|
||||
cmGlobalVisualStudio10Win64Generator.h
|
||||
cmGlobalVisualStudio10Win64Generator.cxx
|
||||
cmGlobalVisualStudio10IA64Generator.h
|
||||
cmGlobalVisualStudio10IA64Generator.cxx
|
||||
cmGlobalVisualStudio11Generator.h
|
||||
cmGlobalVisualStudio11Generator.cxx
|
||||
cmGlobalVisualStudio11Win64Generator.h
|
||||
cmGlobalVisualStudio11Win64Generator.cxx
|
||||
cmGlobalVisualStudio11ARMGenerator.h
|
||||
cmGlobalVisualStudio11ARMGenerator.cxx
|
||||
cmGlobalVisualStudioGenerator.cxx
|
||||
cmGlobalVisualStudioGenerator.h
|
||||
cmGlobalWatcomWMakeGenerator.cxx
|
||||
|
|
|
@ -55,9 +55,9 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalBorlandMakefileGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalBorlandMakefileGenerator::GetActualName();
|
||||
entry.Brief = "Generates Borland makefiles.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator
|
|||
{
|
||||
public:
|
||||
cmGlobalBorlandMakefileGenerator();
|
||||
static cmGlobalGenerator* New()
|
||||
{ return new cmGlobalBorlandMakefileGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalBorlandMakefileGenerator>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
static const char* GetActualName() {return "Borland Makefiles";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -1556,14 +1556,6 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalGenerator::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||
cmLocalGenerator* gen)
|
||||
{
|
||||
|
|
|
@ -49,9 +49,6 @@ public:
|
|||
///! Get the name for this generator
|
||||
virtual const char *GetName() const { return "Generic"; };
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
/**
|
||||
* Create LocalGenerators and process the CMakeLists files. This does not
|
||||
* actually produce any makefiles, DSPs, etc.
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
|
||||
#ifndef cmGlobalGeneratorFactory_h
|
||||
#define cmGlobalGeneratorFactory_h
|
||||
|
||||
#include "cmStandardIncludes.h"
|
||||
|
||||
class cmGlobalGenerator;
|
||||
struct cmDocumentationEntry;
|
||||
|
||||
/** \class cmGlobalGeneratorFactory
|
||||
* \brief Responable for creating cmGlobalGenerator instances
|
||||
*
|
||||
* Subclasses of this class generate instances of cmGlobalGenerator.
|
||||
*/
|
||||
class cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual ~cmGlobalGeneratorFactory() {}
|
||||
|
||||
/** Create a GlobalGenerator */
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* n) const = 0;
|
||||
|
||||
/** Get the documentation entry for this factory */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const = 0;
|
||||
|
||||
/** Get the names of the current registered generators */
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const = 0;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class cmGlobalGeneratorSimpleFactory : public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
/** Create a GlobalGenerator */
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
|
||||
if (strcmp(name, T::GetActualName())) return 0;
|
||||
return new T; }
|
||||
|
||||
/** Get the documentation entry for this factory */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
T::GetDocumentation(entry); }
|
||||
|
||||
/** Get the names of the current registered generators */
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(T::GetActualName()); }
|
||||
};
|
||||
|
||||
#endif
|
|
@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalJOMMakefileGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalJOMMakefileGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalJOMMakefileGenerator::GetActualName();
|
||||
entry.Brief = "Generates JOM makefiles.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ class cmGlobalJOMMakefileGenerator : public cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
public:
|
||||
cmGlobalJOMMakefileGenerator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalJOMMakefileGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalJOMMakefileGenerator>(); }
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalJOMMakefileGenerator::GetActualName();}
|
||||
|
@ -33,7 +34,7 @@ public:
|
|||
static const char* GetActualName() {return "NMake Makefiles JOM";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -106,9 +106,9 @@ cmLocalGenerator *cmGlobalMSYSMakefileGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalMSYSMakefileGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalMSYSMakefileGenerator::GetActualName();
|
||||
entry.Brief = "Generates MSYS makefiles.";
|
||||
entry.Full = "The makefiles use /bin/sh as the shell. "
|
||||
"They require msys to be installed on the machine.";
|
||||
|
|
|
@ -23,8 +23,9 @@ class cmGlobalMSYSMakefileGenerator : public cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
public:
|
||||
cmGlobalMSYSMakefileGenerator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalMSYSMakefileGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalMSYSMakefileGenerator>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
static const char* GetActualName() {return "MSYS Makefiles";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -71,9 +71,9 @@ cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalMinGWMakefileGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalMinGWMakefileGenerator::GetActualName();
|
||||
entry.Brief = "Generates a make file for use with mingw32-make.";
|
||||
entry.Full = "The makefiles generated use cmd.exe as the shell. "
|
||||
"They do not require msys or a unix shell.";
|
||||
|
|
|
@ -23,15 +23,16 @@ class cmGlobalMinGWMakefileGenerator : public cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
public:
|
||||
cmGlobalMinGWMakefileGenerator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalMinGWMakefileGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalMinGWMakefileGenerator>(); }
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalMinGWMakefileGenerator::GetActualName();}
|
||||
static const char* GetActualName() {return "MinGW Makefiles";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalNMakeMakefileGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalNMakeMakefileGenerator::GetActualName();
|
||||
entry.Brief = "Generates NMake makefiles.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -23,15 +23,16 @@ class cmGlobalNMakeMakefileGenerator : public cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
public:
|
||||
cmGlobalNMakeMakefileGenerator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalNMakeMakefileGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalNMakeMakefileGenerator>(); }
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalNMakeMakefileGenerator::GetActualName();}
|
||||
static const char* GetActualName() {return "NMake Makefiles";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -452,9 +452,9 @@ cmLocalGenerator* cmGlobalNinjaGenerator::CreateLocalGenerator()
|
|||
}
|
||||
|
||||
void cmGlobalNinjaGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalNinjaGenerator::GetActualName();
|
||||
entry.Brief = "Generates build.ninja files (experimental).";
|
||||
entry.Full =
|
||||
"A build.ninja file is generated into the build tree. Recent "
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# define cmGlobalNinjaGenerator_h
|
||||
|
||||
# include "cmGlobalGenerator.h"
|
||||
# include "cmGlobalGeneratorFactory.h"
|
||||
# include "cmNinjaTypes.h"
|
||||
|
||||
//#define NINJA_GEN_VERBOSE_FILES
|
||||
|
@ -160,8 +161,8 @@ public:
|
|||
cmGlobalNinjaGenerator();
|
||||
|
||||
/// Convenience method for creating an instance of this class.
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalNinjaGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory<cmGlobalNinjaGenerator>(); }
|
||||
|
||||
/// Destructor.
|
||||
virtual ~cmGlobalNinjaGenerator() { }
|
||||
|
@ -177,7 +178,7 @@ public:
|
|||
static const char* GetActualName() { return "Ninja"; }
|
||||
|
||||
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
/// Overloaded methods. @see cmGlobalGenerator::Generate()
|
||||
virtual void Generate();
|
||||
|
|
|
@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalUnixMakefileGenerator3::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalUnixMakefileGenerator3
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalUnixMakefileGenerator3::GetActualName();
|
||||
entry.Brief = "Generates standard UNIX makefiles.";
|
||||
entry.Full =
|
||||
"A hierarchy of UNIX makefiles is generated into the build tree. Any "
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define cmGlobalUnixMakefileGenerator3_h
|
||||
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmGlobalGeneratorFactory.h"
|
||||
|
||||
class cmGeneratedFileStream;
|
||||
class cmMakefileTargetGenerator;
|
||||
|
@ -54,8 +55,9 @@ class cmGlobalUnixMakefileGenerator3 : public cmGlobalGenerator
|
|||
{
|
||||
public:
|
||||
cmGlobalUnixMakefileGenerator3();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalUnixMakefileGenerator3; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalUnixMakefileGenerator3>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -63,7 +65,7 @@ public:
|
|||
static const char* GetActualName() {return "Unix Makefiles";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator3
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -16,8 +16,61 @@
|
|||
#include "cmSourceFile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
static const char vs10Win32generatorName[] = "Visual Studio 10";
|
||||
static const char vs10Win64generatorName[] = "Visual Studio 10 Win64";
|
||||
static const char vs10IA64generatorName[] = "Visual Studio 10 IA64";
|
||||
|
||||
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator()
|
||||
class cmGlobalVisualStudio10Generator::Factory
|
||||
: public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
|
||||
if(!strcmp(name, vs10Win32generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio10Generator(
|
||||
vs10Win32generatorName, NULL, NULL);
|
||||
}
|
||||
if(!strcmp(name, vs10Win64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio10Generator(
|
||||
vs10Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
||||
}
|
||||
if(!strcmp(name, vs10IA64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio10Generator(
|
||||
vs10IA64generatorName, "Itanium", "CMAKE_FORCE_IA64");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
entry.Name = "Visual Studio 10";
|
||||
entry.Brief = "Generates Visual Studio 10 project files.";
|
||||
entry.Full =
|
||||
"It is possible to append a space followed by the platform name "
|
||||
"to create project files for a specific target platform. E.g. "
|
||||
"\"Visual Studio 10 Win64\" will create project files for "
|
||||
"the x64 processor; \"Visual Studio 10 IA64\" for Itanium.";
|
||||
}
|
||||
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(vs10Win32generatorName);
|
||||
names.push_back(vs10Win64generatorName);
|
||||
names.push_back(vs10IA64generatorName); }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
|
||||
{
|
||||
return new Factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
|
||||
const char* name, const char* architectureId,
|
||||
const char* additionalPlatformDefinition)
|
||||
: cmGlobalVisualStudio8Generator(name, architectureId,
|
||||
additionalPlatformDefinition)
|
||||
{
|
||||
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
|
||||
std::string vc10Express;
|
||||
|
@ -86,20 +139,19 @@ void cmGlobalVisualStudio10Generator::Generate()
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 10 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10Generator
|
||||
::EnableLanguage(std::vector<std::string>const & lang,
|
||||
cmMakefile *mf, bool optional)
|
||||
{
|
||||
if(!strcmp(this->ArchitectureId, "Itanium") ||
|
||||
!strcmp(this->ArchitectureId, "x64"))
|
||||
{
|
||||
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ class cmGlobalVisualStudio10Generator :
|
|||
public cmGlobalVisualStudio8Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio10Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio10Generator; }
|
||||
cmGlobalVisualStudio10Generator(const char* name,
|
||||
const char* architectureId, const char* additionalPlatformDefinition);
|
||||
static cmGlobalGeneratorFactory* NewFactory();
|
||||
|
||||
virtual std::string
|
||||
GenerateBuildCommand(const char* makeProgram,
|
||||
|
@ -34,15 +34,8 @@ public:
|
|||
const char* additionalOptions, const char *targetName,
|
||||
const char* config, bool ignoreErrors, bool);
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio10Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 10";}
|
||||
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
///! create the correct local generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
||||
|
@ -92,6 +85,7 @@ protected:
|
|||
bool UseFolderProperty();
|
||||
|
||||
private:
|
||||
class Factory;
|
||||
struct LongestSourcePath
|
||||
{
|
||||
LongestSourcePath(): Length(0), Target(0), SourceFile(0) {}
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio10IA64Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio10IA64Generator::cmGlobalVisualStudio10IA64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10IA64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 10 Itanium project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10IA64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10IA64Generator
|
||||
::EnableLanguage(std::vector<std::string> const& languages,
|
||||
cmMakefile* mf, bool optional)
|
||||
{
|
||||
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
|
||||
{
|
||||
return;
|
||||
}
|
||||
this->cmGlobalVisualStudio10Generator
|
||||
::EnableLanguage(languages, mf, optional);
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio10IA64Generator_h
|
||||
#define cmGlobalVisualStudio10IA64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio10Generator.h"
|
||||
|
||||
class cmGlobalVisualStudio10IA64Generator :
|
||||
public cmGlobalVisualStudio10Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio10IA64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio10IA64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio10IA64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 10 IA64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "Itanium";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||
|
||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||
cmMakefile *, bool optional);
|
||||
};
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio10Win64Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio10Win64Generator::cmGlobalVisualStudio10Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10Win64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 10 Win64 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10Win64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio10Win64Generator
|
||||
::EnableLanguage(std::vector<std::string> const& languages,
|
||||
cmMakefile* mf, bool optional)
|
||||
{
|
||||
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
|
||||
{
|
||||
return;
|
||||
}
|
||||
this->cmGlobalVisualStudio10Generator
|
||||
::EnableLanguage(languages, mf, optional);
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio10Win64Generator_h
|
||||
#define cmGlobalVisualStudio10Win64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio10Generator.h"
|
||||
|
||||
class cmGlobalVisualStudio10Win64Generator :
|
||||
public cmGlobalVisualStudio10Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio10Win64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio10Win64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio10Win64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 10 Win64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "x64";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||
|
||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||
cmMakefile *, bool optional);
|
||||
};
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio11ARMGenerator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio11ARMGenerator::cmGlobalVisualStudio11ARMGenerator()
|
||||
{
|
||||
this->ArchitectureId = "ARM";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio11ARMGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 11 ARM project files.";
|
||||
entry.Full = "";
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio11ARMGenerator_h
|
||||
#define cmGlobalVisualStudio11ARMGenerator_h
|
||||
|
||||
#include "cmGlobalVisualStudio11Generator.h"
|
||||
|
||||
class cmGlobalVisualStudio11ARMGenerator :
|
||||
public cmGlobalVisualStudio11Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio11ARMGenerator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio11ARMGenerator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio11ARMGenerator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 11 ARM";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "ARM";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
};
|
||||
#endif
|
|
@ -13,8 +13,61 @@
|
|||
#include "cmLocalVisualStudio10Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
|
||||
static const char vs11Win32generatorName[] = "Visual Studio 11";
|
||||
static const char vs11Win64generatorName[] = "Visual Studio 11 Win64";
|
||||
static const char vs11ARMgeneratorName[] = "Visual Studio 11 ARM";
|
||||
|
||||
class cmGlobalVisualStudio11Generator::Factory
|
||||
: public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
|
||||
if(!strcmp(name, vs11Win32generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio11Generator(
|
||||
vs11Win32generatorName, NULL, NULL);
|
||||
}
|
||||
if(!strcmp(name, vs11Win64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio11Generator(
|
||||
vs11Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
||||
}
|
||||
if(!strcmp(name, vs11ARMgeneratorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio11Generator(
|
||||
vs11ARMgeneratorName, "ARM", NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
entry.Name = "Visual Studio 11";
|
||||
entry.Brief = "Generates Visual Studio 11 project files.";
|
||||
entry.Full =
|
||||
"It is possible to append a space followed by the platform name "
|
||||
"to create project files for a specific target platform. E.g. "
|
||||
"\"Visual Studio 11 Win64\" will create project files for "
|
||||
"the x64 processor; \"Visual Studio 11 ARM\" for ARM.";
|
||||
}
|
||||
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(vs11Win32generatorName);
|
||||
names.push_back(vs11Win64generatorName);
|
||||
names.push_back(vs11ARMgeneratorName); }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator()
|
||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
|
||||
{
|
||||
return new Factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator(
|
||||
const char* name, const char* architectureId,
|
||||
const char* additionalPlatformDefinition)
|
||||
: cmGlobalVisualStudio10Generator(name, architectureId,
|
||||
additionalPlatformDefinition)
|
||||
{
|
||||
this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
|
||||
std::string vc11Express;
|
||||
|
@ -40,12 +93,3 @@ cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator()
|
|||
lg->SetGlobalGenerator(this);
|
||||
return lg;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio11Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 11 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -20,20 +20,12 @@ class cmGlobalVisualStudio11Generator:
|
|||
public cmGlobalVisualStudio10Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio11Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio11Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio11Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 11";}
|
||||
cmGlobalVisualStudio11Generator(const char* name,
|
||||
const char* architectureId, const char* additionalPlatformDefinition);
|
||||
static cmGlobalGeneratorFactory* NewFactory();
|
||||
|
||||
virtual void WriteSLNHeader(std::ostream& fout);
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
///! create the correct local generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
||||
|
@ -41,5 +33,7 @@ public:
|
|||
virtual std::string GetUserMacrosDirectory() { return ""; }
|
||||
protected:
|
||||
virtual const char* GetIDEVersion() { return "11.0"; }
|
||||
private:
|
||||
class Factory;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio11Win64Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio11Win64Generator::cmGlobalVisualStudio11Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio11Win64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 11 Win64 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio11Win64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio11Win64Generator_h
|
||||
#define cmGlobalVisualStudio11Win64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio11Generator.h"
|
||||
|
||||
class cmGlobalVisualStudio11Win64Generator :
|
||||
public cmGlobalVisualStudio11Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio11Win64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio11Win64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio11Win64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 11 Win64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "x64";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||
};
|
||||
#endif
|
|
@ -397,9 +397,9 @@ cmGlobalVisualStudio6Generator::WriteUtilityDepend(cmTarget* target)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio6Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalVisualStudio6Generator::GetActualName();
|
||||
entry.Brief = "Generates Visual Studio 6 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define cmGlobalVisualStudio6Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudioGenerator.h"
|
||||
#include "cmGlobalGeneratorFactory.h"
|
||||
|
||||
class cmTarget;
|
||||
|
||||
|
@ -25,8 +26,9 @@ class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator
|
|||
{
|
||||
public:
|
||||
cmGlobalVisualStudio6Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio6Generator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalVisualStudio6Generator>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -34,7 +36,7 @@ public:
|
|||
static const char* GetActualName() {return "Visual Studio 6";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -308,9 +308,9 @@ void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio71Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalVisualStudio71Generator::GetActualName();
|
||||
entry.Brief = "Generates Visual Studio .NET 2003 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator
|
|||
{
|
||||
public:
|
||||
cmGlobalVisualStudio71Generator();
|
||||
static cmGlobalGenerator* New()
|
||||
{ return new cmGlobalVisualStudio71Generator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalVisualStudio71Generator>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -33,7 +34,7 @@ public:
|
|||
static const char* GetActualName() {return "Visual Studio 7 .NET 2003";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -809,9 +809,9 @@ std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio7Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalVisualStudio7Generator::GetActualName();
|
||||
entry.Brief = "Generates Visual Studio .NET 2002 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define cmGlobalVisualStudio7Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudioGenerator.h"
|
||||
#include "cmGlobalGeneratorFactory.h"
|
||||
|
||||
class cmTarget;
|
||||
struct cmIDEFlagTable;
|
||||
|
@ -26,8 +27,9 @@ class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
|
|||
{
|
||||
public:
|
||||
cmGlobalVisualStudio7Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio7Generator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalVisualStudio7Generator>(); }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -38,7 +40,7 @@ public:
|
|||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
/**
|
||||
* Try to determine system infomation such as shared library
|
||||
|
|
|
@ -16,11 +16,74 @@
|
|||
#include "cmake.h"
|
||||
#include "cmGeneratedFileStream.h"
|
||||
|
||||
static const char vs8Win32generatorName[] = "Visual Studio 8 2005";
|
||||
static const char vs8Win64generatorName[] = "Visual Studio 8 2005 Win64";
|
||||
|
||||
class cmGlobalVisualStudio8Generator::Factory
|
||||
: public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
|
||||
if(!strcmp(name, vs8Win32generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio8Generator(
|
||||
vs8Win32generatorName, NULL, NULL);
|
||||
}
|
||||
if(!strcmp(name, vs8Win64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio8Generator(
|
||||
vs8Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
entry.Name = "Visual Studio 8 2005";
|
||||
entry.Brief = "Generates Visual Studio 8 2005 project files.";
|
||||
entry.Full =
|
||||
"It is possible to append a space followed by the platform name "
|
||||
"to create project files for a specific target platform. E.g. "
|
||||
"\"Visual Studio 8 2005 Win64\" will create project files for "
|
||||
"the x64 processor.";
|
||||
}
|
||||
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(vs8Win32generatorName);
|
||||
names.push_back(vs8Win64generatorName); }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator()
|
||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
|
||||
{
|
||||
return new Factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
|
||||
const char* name, const char* architectureId,
|
||||
const char* additionalPlatformDefinition)
|
||||
{
|
||||
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
|
||||
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
|
||||
this->Name = name;
|
||||
if (architectureId)
|
||||
{
|
||||
this->ArchitectureId = architectureId;
|
||||
}
|
||||
if (additionalPlatformDefinition)
|
||||
{
|
||||
this->AdditionalPlatformDefinition = additionalPlatformDefinition;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmGlobalVisualStudio8Generator::GetPlatformName() const
|
||||
{
|
||||
if (!strcmp(this->ArchitectureId, "X86"))
|
||||
{
|
||||
return "Win32";
|
||||
}
|
||||
return this->ArchitectureId;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -45,9 +108,9 @@ void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio8Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalVisualStudio8Generator::GetActualName();
|
||||
entry.Brief = "Generates Visual Studio 8 2005 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -23,19 +23,17 @@
|
|||
class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio8Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio8Generator; }
|
||||
cmGlobalVisualStudio8Generator(const char* name,
|
||||
const char* architectureId, const char* additionalPlatformDefinition);
|
||||
static cmGlobalGeneratorFactory* NewFactory();
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio8Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 8 2005";}
|
||||
virtual const char* GetName() const {return this->Name;}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "Win32";}
|
||||
const char* GetPlatformName() const;
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
@ -81,5 +79,10 @@ protected:
|
|||
virtual bool ComputeTargetDepends();
|
||||
virtual void WriteProjectDepends(std::ostream& fout, const char* name,
|
||||
const char* path, cmTarget &t);
|
||||
|
||||
const char* Name;
|
||||
|
||||
private:
|
||||
class Factory;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "windows.h" // this must be first to define GetCurrentDirectory
|
||||
#include "cmGlobalVisualStudio8Win64Generator.h"
|
||||
#include "cmLocalVisualStudio7Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
|
||||
|
||||
cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio8Win64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 8 2005 Win64 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio8Win64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio8Win64Generator_h
|
||||
#define cmGlobalVisualStudio8Win64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio8Generator.h"
|
||||
|
||||
|
||||
/** \class cmGlobalVisualStudio8Win64Generator
|
||||
* \brief Write a Unix makefiles.
|
||||
*
|
||||
* cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree
|
||||
*/
|
||||
class cmGlobalVisualStudio8Win64Generator :
|
||||
public cmGlobalVisualStudio8Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio8Win64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio8Win64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio8Win64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 8 2005 Win64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "x64";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
/**
|
||||
* Try to determine system infomation such as shared library
|
||||
* extension, pthreads, byte order etc.
|
||||
*/
|
||||
virtual void AddPlatformDefinitions(cmMakefile *);
|
||||
};
|
||||
#endif
|
|
@ -15,9 +15,61 @@
|
|||
#include "cmMakefile.h"
|
||||
#include "cmake.h"
|
||||
|
||||
static const char vs9Win32generatorName[] = "Visual Studio 9 2008";
|
||||
static const char vs9Win64generatorName[] = "Visual Studio 8 2005 Win64";
|
||||
static const char vs9IA64generatorName[] = "Visual Studio 9 2008 IA64";
|
||||
|
||||
class cmGlobalVisualStudio9Generator::Factory
|
||||
: public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
|
||||
if(!strcmp(name, vs9Win32generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio9Generator(
|
||||
vs9Win32generatorName, NULL, NULL);
|
||||
}
|
||||
if(!strcmp(name, vs9Win64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio9Generator(
|
||||
vs9Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
||||
}
|
||||
if(!strcmp(name, vs9IA64generatorName))
|
||||
{
|
||||
return new cmGlobalVisualStudio9Generator(
|
||||
vs9IA64generatorName, "Itanium", "CMAKE_FORCE_IA64");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator()
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
entry.Name = "Visual Studio 9 2008";
|
||||
entry.Brief = "Generates Visual Studio 9 2008 project files.";
|
||||
entry.Full =
|
||||
"It is possible to append a space followed by the platform name "
|
||||
"to create project files for a specific target platform. E.g. "
|
||||
"\"Visual Studio 9 2008 Win64\" will create project files for "
|
||||
"the x64 processor; \"Visual Studio 9 2008 IA64\" for Itanium.";
|
||||
}
|
||||
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(vs9Win32generatorName);
|
||||
names.push_back(vs9Win64generatorName);
|
||||
names.push_back(vs9IA64generatorName); }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
|
||||
{
|
||||
return new Factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator(
|
||||
const char* name, const char* architectureId,
|
||||
const char* additionalPlatformDefinition)
|
||||
: cmGlobalVisualStudio8Generator(name, architectureId,
|
||||
additionalPlatformDefinition)
|
||||
{
|
||||
this->FindMakeProgramFile = "CMakeVS9FindMake.cmake";
|
||||
}
|
||||
|
@ -40,15 +92,6 @@ cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
|
|||
return lg;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 9 2008 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9Generator
|
||||
::EnableLanguage(std::vector<std::string>const & lang,
|
||||
|
|
|
@ -24,17 +24,9 @@ class cmGlobalVisualStudio9Generator :
|
|||
public cmGlobalVisualStudio8Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio9Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio9Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio9Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 9 2008";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
cmGlobalVisualStudio9Generator(const char* name,
|
||||
const char* architectureId, const char* additionalPlatformDefinition);
|
||||
static cmGlobalGeneratorFactory* NewFactory();
|
||||
|
||||
///! create the correct local generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
@ -61,5 +53,7 @@ public:
|
|||
virtual std::string GetUserMacrosRegKeyBase();
|
||||
protected:
|
||||
virtual const char* GetIDEVersion() { return "9.0"; }
|
||||
private:
|
||||
class Factory;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio9IA64Generator.h"
|
||||
#include "cmLocalVisualStudio7Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
|
||||
|
||||
cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator()
|
||||
{
|
||||
this->ArchitectureId = "Itanium";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9IA64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 9 2008 Itanium project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9IA64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE");
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio9IA64Generator_h
|
||||
#define cmGlobalVisualStudio9IA64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio9Generator.h"
|
||||
|
||||
|
||||
/** \class cmGlobalVisualStudio8IA64Generator
|
||||
* \brief Write a Unix makefiles.
|
||||
*
|
||||
* cmGlobalVisualStudio8IA64Generator manages UNIX build process for a tree
|
||||
*/
|
||||
class cmGlobalVisualStudio9IA64Generator :
|
||||
public cmGlobalVisualStudio9Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio9IA64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio9IA64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio9IA64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 9 2008 IA64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "Itanium";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
/**
|
||||
* Try to determine system infomation such as shared library
|
||||
* extension, pthreads, byte order etc.
|
||||
*/
|
||||
virtual void AddPlatformDefinitions(cmMakefile *);
|
||||
};
|
||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#include "cmGlobalVisualStudio9Win64Generator.h"
|
||||
#include "cmLocalVisualStudio7Generator.h"
|
||||
#include "cmMakefile.h"
|
||||
|
||||
|
||||
cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9Win64Generator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Brief = "Generates Visual Studio 9 2008 Win64 project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9Win64Generator
|
||||
::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*============================================================================
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
||||
|
||||
Distributed under the OSI-approved BSD License (the "License");
|
||||
see accompanying file Copyright.txt for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the License for more information.
|
||||
============================================================================*/
|
||||
#ifndef cmGlobalVisualStudio9Win64Generator_h
|
||||
#define cmGlobalVisualStudio9Win64Generator_h
|
||||
|
||||
#include "cmGlobalVisualStudio9Generator.h"
|
||||
|
||||
|
||||
/** \class cmGlobalVisualStudio8Win64Generator
|
||||
* \brief Write a Unix makefiles.
|
||||
*
|
||||
* cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree
|
||||
*/
|
||||
class cmGlobalVisualStudio9Win64Generator :
|
||||
public cmGlobalVisualStudio9Generator
|
||||
{
|
||||
public:
|
||||
cmGlobalVisualStudio9Win64Generator();
|
||||
static cmGlobalGenerator* New() {
|
||||
return new cmGlobalVisualStudio9Win64Generator; }
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalVisualStudio9Win64Generator::GetActualName();}
|
||||
static const char* GetActualName() {return "Visual Studio 9 2008 Win64";}
|
||||
|
||||
virtual const char* GetPlatformName() const {return "x64";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
|
||||
/**
|
||||
* Try to determine system infomation such as shared library
|
||||
* extension, pthreads, byte order etc.
|
||||
*/
|
||||
virtual void AddPlatformDefinitions(cmMakefile *);
|
||||
};
|
||||
#endif
|
|
@ -22,6 +22,7 @@
|
|||
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
|
||||
{
|
||||
this->ArchitectureId = "X86";
|
||||
this->AdditionalPlatformDefinition = NULL;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -493,6 +494,11 @@ void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
|
|||
{
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
|
||||
if(this->AdditionalPlatformDefinition)
|
||||
{
|
||||
mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE");
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -99,6 +99,7 @@ protected:
|
|||
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
|
||||
UtilityDependsMap UtilityDepends;
|
||||
const char* ArchitectureId;
|
||||
const char* AdditionalPlatformDefinition;
|
||||
|
||||
private:
|
||||
void ComputeTargetObjects(cmGeneratorTarget* gt) const;
|
||||
|
|
|
@ -58,9 +58,9 @@ cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalWatcomWMakeGenerator
|
||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||
::GetDocumentation(cmDocumentationEntry& entry)
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
|
||||
entry.Brief = "Generates Watcom WMake makefiles.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -23,14 +23,16 @@ class cmGlobalWatcomWMakeGenerator : public cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
public:
|
||||
cmGlobalWatcomWMakeGenerator();
|
||||
static cmGlobalGenerator* New() { return new cmGlobalWatcomWMakeGenerator; }
|
||||
static cmGlobalGeneratorFactory* NewFactory() {
|
||||
return new cmGlobalGeneratorSimpleFactory
|
||||
<cmGlobalWatcomWMakeGenerator>(); }
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
return cmGlobalWatcomWMakeGenerator::GetActualName();}
|
||||
static const char* GetActualName() {return "Watcom WMake";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "cmSourceFile.h"
|
||||
#include "cmCustomCommandGenerator.h"
|
||||
#include "cmGeneratorTarget.h"
|
||||
#include "cmGlobalGeneratorFactory.h"
|
||||
|
||||
#include <cmsys/auto_ptr.hxx>
|
||||
|
||||
|
@ -112,6 +113,18 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class cmGlobalXCodeGenerator::Factory : public cmGlobalGeneratorFactory
|
||||
{
|
||||
public:
|
||||
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const;
|
||||
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
|
||||
cmGlobalXCodeGenerator::GetDocumentation(entry); }
|
||||
|
||||
virtual void GetGenerators(std::vector<std::string>& names) const {
|
||||
names.push_back(cmGlobalXCodeGenerator::GetActualName()); }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
|
||||
{
|
||||
|
@ -132,8 +145,17 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalGenerator* cmGlobalXCodeGenerator::New()
|
||||
cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory()
|
||||
{
|
||||
return new Factory;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmGlobalGenerator* cmGlobalXCodeGenerator::Factory
|
||||
::CreateGlobalGenerator(const char* name) const
|
||||
{
|
||||
if (strcmp(name, GetActualName()))
|
||||
return 0;
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
cmXcodeVersionParser parser;
|
||||
std::string versionFile;
|
||||
|
@ -3474,9 +3496,8 @@ const char* cmGlobalXCodeGenerator::GetCMakeCFGIntDir() const
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry)
|
||||
const
|
||||
{
|
||||
entry.Name = this->GetName();
|
||||
entry.Name = cmGlobalXCodeGenerator::GetActualName();
|
||||
entry.Brief = "Generate Xcode project files.";
|
||||
entry.Full = "";
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "cmGlobalGenerator.h"
|
||||
#include "cmXCodeObject.h"
|
||||
#include "cmCustomCommand.h"
|
||||
class cmGlobalGeneratorFactory;
|
||||
class cmTarget;
|
||||
class cmSourceFile;
|
||||
class cmSourceGroup;
|
||||
|
@ -29,7 +30,7 @@ class cmGlobalXCodeGenerator : public cmGlobalGenerator
|
|||
{
|
||||
public:
|
||||
cmGlobalXCodeGenerator(std::string const& version);
|
||||
static cmGlobalGenerator* New();
|
||||
static cmGlobalGeneratorFactory* NewFactory();
|
||||
|
||||
///! Get the name for the generator.
|
||||
virtual const char* GetName() const {
|
||||
|
@ -37,7 +38,7 @@ public:
|
|||
static const char* GetActualName() {return "Xcode";}
|
||||
|
||||
/** Get the documentation entry for this generator. */
|
||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||
|
@ -186,6 +187,7 @@ private:
|
|||
const char* varNameSuffix,
|
||||
const char* default_flags);
|
||||
|
||||
class Factory;
|
||||
class BuildObjectListOrString;
|
||||
friend class BuildObjectListOrString;
|
||||
|
||||
|
|
137
Source/cmake.cxx
137
Source/cmake.cxx
|
@ -63,15 +63,8 @@
|
|||
# include "cmGlobalVisualStudio71Generator.h"
|
||||
# include "cmGlobalVisualStudio8Generator.h"
|
||||
# include "cmGlobalVisualStudio9Generator.h"
|
||||
# include "cmGlobalVisualStudio9IA64Generator.h"
|
||||
# include "cmGlobalVisualStudio9Win64Generator.h"
|
||||
# include "cmGlobalVisualStudio10Generator.h"
|
||||
# include "cmGlobalVisualStudio10IA64Generator.h"
|
||||
# include "cmGlobalVisualStudio10Win64Generator.h"
|
||||
# include "cmGlobalVisualStudio11Generator.h"
|
||||
# include "cmGlobalVisualStudio11Win64Generator.h"
|
||||
# include "cmGlobalVisualStudio11ARMGenerator.h"
|
||||
# include "cmGlobalVisualStudio8Win64Generator.h"
|
||||
# include "cmGlobalBorlandMakefileGenerator.h"
|
||||
# include "cmGlobalNMakeMakefileGenerator.h"
|
||||
# include "cmGlobalJOMMakefileGenerator.h"
|
||||
|
@ -222,6 +215,11 @@ cmake::~cmake()
|
|||
{
|
||||
delete (*j).second;
|
||||
}
|
||||
for(RegisteredGeneratorsVector::iterator j = this->Generators.begin();
|
||||
j != this->Generators.end(); ++j)
|
||||
{
|
||||
delete *j;
|
||||
}
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
delete this->VariableWatch;
|
||||
#endif
|
||||
|
@ -1869,10 +1867,10 @@ void cmake::AddDefaultExtraGenerators()
|
|||
//----------------------------------------------------------------------------
|
||||
void cmake::GetRegisteredGenerators(std::vector<std::string>& names)
|
||||
{
|
||||
for(RegisteredGeneratorsMap::const_iterator i = this->Generators.begin();
|
||||
for(RegisteredGeneratorsVector::const_iterator i = this->Generators.begin();
|
||||
i != this->Generators.end(); ++i)
|
||||
{
|
||||
names.push_back(i->first);
|
||||
(*i)->GetGenerators(names);
|
||||
}
|
||||
for(RegisteredExtraGeneratorsMap::const_iterator
|
||||
i = this->ExtraGenerators.begin();
|
||||
|
@ -1884,29 +1882,36 @@ void cmake::GetRegisteredGenerators(std::vector<std::string>& names)
|
|||
|
||||
cmGlobalGenerator* cmake::CreateGlobalGenerator(const char* name)
|
||||
{
|
||||
cmGlobalGenerator* generator = 0;
|
||||
cmExternalMakefileProjectGenerator* extraGenerator = 0;
|
||||
RegisteredGeneratorsMap::const_iterator genIt = this->Generators.find(name);
|
||||
if(genIt == this->Generators.end())
|
||||
{
|
||||
RegisteredExtraGeneratorsMap::const_iterator extraGenIt =
|
||||
this->ExtraGenerators.find(name);
|
||||
if (extraGenIt == this->ExtraGenerators.end())
|
||||
if (extraGenIt != this->ExtraGenerators.end())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
extraGenerator = (extraGenIt->second)();
|
||||
genIt=this->Generators.find(extraGenerator->GetGlobalGeneratorName(name));
|
||||
if(genIt == this->Generators.end())
|
||||
name = extraGenerator->GetGlobalGeneratorName(name);
|
||||
}
|
||||
|
||||
cmGlobalGenerator* generator = 0;
|
||||
for (RegisteredGeneratorsVector::const_iterator i =
|
||||
this->Generators.begin(); i != this->Generators.end(); ++i)
|
||||
{
|
||||
delete extraGenerator;
|
||||
return 0;
|
||||
generator = (*i)->CreateGlobalGenerator(name);
|
||||
if (generator)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
generator = (genIt->second)();
|
||||
if (generator)
|
||||
{
|
||||
generator->SetCMakeInstance(this);
|
||||
generator->SetExternalMakefileProjectGenerator(extraGenerator);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete extraGenerator;
|
||||
}
|
||||
|
||||
return generator;
|
||||
}
|
||||
|
||||
|
@ -2570,55 +2575,41 @@ void cmake::AddDefaultGenerators()
|
|||
{
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
# if !defined(CMAKE_BOOT_MINGW)
|
||||
this->Generators[cmGlobalVisualStudio6Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio6Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio7Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio7Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio10Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio10Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio10IA64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio10IA64Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio10Win64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio10Win64Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio11Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio11Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio11Win64Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio11ARMGenerator::GetActualName()] =
|
||||
&cmGlobalVisualStudio11ARMGenerator::New;
|
||||
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio71Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio8Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio9Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio9Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio9IA64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio9IA64Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio9Win64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio9Win64Generator::New;
|
||||
this->Generators[cmGlobalVisualStudio8Win64Generator::GetActualName()] =
|
||||
&cmGlobalVisualStudio8Win64Generator::New;
|
||||
this->Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] =
|
||||
&cmGlobalBorlandMakefileGenerator::New;
|
||||
this->Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] =
|
||||
&cmGlobalNMakeMakefileGenerator::New;
|
||||
this->Generators[cmGlobalJOMMakefileGenerator::GetActualName()] =
|
||||
&cmGlobalJOMMakefileGenerator::New;
|
||||
this->Generators[cmGlobalWatcomWMakeGenerator::GetActualName()] =
|
||||
&cmGlobalWatcomWMakeGenerator::New;
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio6Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio7Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio10Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio11Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio71Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio8Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalVisualStudio9Generator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalBorlandMakefileGenerator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalNMakeMakefileGenerator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalJOMMakefileGenerator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalWatcomWMakeGenerator::NewFactory());
|
||||
# endif
|
||||
this->Generators[cmGlobalMSYSMakefileGenerator::GetActualName()] =
|
||||
&cmGlobalMSYSMakefileGenerator::New;
|
||||
this->Generators[cmGlobalMinGWMakefileGenerator::GetActualName()] =
|
||||
&cmGlobalMinGWMakefileGenerator::New;
|
||||
this->Generators.push_back(
|
||||
cmGlobalMSYSMakefileGenerator::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalMinGWMakefileGenerator::NewFactory());
|
||||
#endif
|
||||
this->Generators[cmGlobalUnixMakefileGenerator3::GetActualName()] =
|
||||
&cmGlobalUnixMakefileGenerator3::New;
|
||||
this->Generators[cmGlobalNinjaGenerator::GetActualName()] =
|
||||
&cmGlobalNinjaGenerator::New;
|
||||
this->Generators.push_back(
|
||||
cmGlobalUnixMakefileGenerator3::NewFactory());
|
||||
this->Generators.push_back(
|
||||
cmGlobalNinjaGenerator::NewFactory());
|
||||
#ifdef CMAKE_USE_XCODE
|
||||
this->Generators[cmGlobalXCodeGenerator::GetActualName()] =
|
||||
&cmGlobalXCodeGenerator::New;
|
||||
this->Generators.push_back(
|
||||
cmGlobalXCodeGenerator::NewFactory());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2712,17 +2703,15 @@ void cmake::GetPropertiesDocumentation(std::map<std::string,
|
|||
|
||||
void cmake::GetGeneratorDocumentation(std::vector<cmDocumentationEntry>& v)
|
||||
{
|
||||
for(RegisteredGeneratorsMap::const_iterator i = this->Generators.begin();
|
||||
i != this->Generators.end(); ++i)
|
||||
for(RegisteredGeneratorsVector::const_iterator i =
|
||||
this->Generators.begin(); i != this->Generators.end(); ++i)
|
||||
{
|
||||
cmDocumentationEntry e;
|
||||
cmGlobalGenerator* generator = (i->second)();
|
||||
generator->GetDocumentation(e);
|
||||
delete generator;
|
||||
(*i)->GetDocumentation(e);
|
||||
v.push_back(e);
|
||||
}
|
||||
for(RegisteredExtraGeneratorsMap::const_iterator
|
||||
i = this->ExtraGenerators.begin(); i != this->ExtraGenerators.end(); ++i)
|
||||
for(RegisteredExtraGeneratorsMap::const_iterator i =
|
||||
this->ExtraGenerators.begin(); i != this->ExtraGenerators.end(); ++i)
|
||||
{
|
||||
cmDocumentationEntry e;
|
||||
cmExternalMakefileProjectGenerator* generator = (i->second)();
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "cmPropertyDefinitionMap.h"
|
||||
#include "cmPropertyMap.h"
|
||||
|
||||
class cmGlobalGeneratorFactory;
|
||||
class cmGlobalGenerator;
|
||||
class cmLocalGenerator;
|
||||
class cmCacheManager;
|
||||
|
@ -396,12 +397,9 @@ protected:
|
|||
cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)();
|
||||
typedef std::map<cmStdString,
|
||||
CreateExtraGeneratorFunctionType> RegisteredExtraGeneratorsMap;
|
||||
|
||||
typedef cmGlobalGenerator* (*CreateGeneratorFunctionType)();
|
||||
typedef std::map<cmStdString,
|
||||
CreateGeneratorFunctionType> RegisteredGeneratorsMap;
|
||||
typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
|
||||
RegisteredCommandsMap Commands;
|
||||
RegisteredGeneratorsMap Generators;
|
||||
RegisteredGeneratorsVector Generators;
|
||||
RegisteredExtraGeneratorsMap ExtraGenerators;
|
||||
void AddDefaultCommands();
|
||||
void AddDefaultGenerators();
|
||||
|
|
Loading…
Reference in New Issue