Merge topic 'vs-version-ivar'
c92ffec
Enumerate VS11 version explicitly in local generators1be4b6f
Order VS local generator Version ivar values consistently
This commit is contained in:
commit
7efd93cd72
|
@ -43,7 +43,8 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio10Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio10Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio10Generator* lg = new cmLocalVisualStudio10Generator;
|
cmLocalVisualStudio10Generator* lg =
|
||||||
|
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS10);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
return lg;
|
return lg;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
See the License for more information.
|
See the License for more information.
|
||||||
============================================================================*/
|
============================================================================*/
|
||||||
#include "cmGlobalVisualStudio11Generator.h"
|
#include "cmGlobalVisualStudio11Generator.h"
|
||||||
|
#include "cmLocalVisualStudio10Generator.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -35,6 +36,16 @@ void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
|
||||||
fout << "# Visual Studio 11\n";
|
fout << "# Visual Studio 11\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator()
|
||||||
|
{
|
||||||
|
cmLocalVisualStudio10Generator* lg =
|
||||||
|
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS11);
|
||||||
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
|
lg->SetGlobalGenerator(this);
|
||||||
|
return lg;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio11Generator
|
void cmGlobalVisualStudio11Generator
|
||||||
::GetDocumentation(cmDocumentationEntry& entry) const
|
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||||
|
|
|
@ -35,6 +35,9 @@ public:
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
|
///! create the correct local generator
|
||||||
|
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||||
|
|
||||||
/** TODO: VS 11 user macro support. */
|
/** TODO: VS 11 user macro support. */
|
||||||
virtual std::string GetUserMacrosDirectory() { return ""; }
|
virtual std::string GetUserMacrosDirectory() { return ""; }
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -26,8 +26,8 @@ cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator()
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg =
|
||||||
lg->SetVersion71();
|
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS71);
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
return lg;
|
return lg;
|
||||||
|
|
|
@ -133,7 +133,8 @@ std::string cmGlobalVisualStudio7Generator
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg =
|
||||||
|
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS7);
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
return lg;
|
return lg;
|
||||||
|
|
|
@ -28,8 +28,8 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator()
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg =
|
||||||
lg->SetVersion8();
|
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
|
|
|
@ -25,8 +25,8 @@ cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg
|
||||||
lg->SetVersion8();
|
= new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
|
|
|
@ -40,8 +40,8 @@ void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout)
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg
|
||||||
lg->SetVersion9();
|
= new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
|
|
|
@ -22,8 +22,8 @@ cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator()
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio9IA64Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio9IA64Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg =
|
||||||
lg->SetVersion9();
|
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
|
|
|
@ -22,8 +22,8 @@ cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
|
cmLocalVisualStudio7Generator *lg =
|
||||||
lg->SetVersion9();
|
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9);
|
||||||
lg->SetPlatformName(this->GetPlatformName());
|
lg->SetPlatformName(this->GetPlatformName());
|
||||||
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
|
|
|
@ -61,7 +61,8 @@ class cmVS10XMLParser : public cmXMLParser
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudio10Generator::cmLocalVisualStudio10Generator()
|
cmLocalVisualStudio10Generator::cmLocalVisualStudio10Generator(VSVersion v):
|
||||||
|
cmLocalVisualStudio7Generator(v)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalVisualStudio10Generator();
|
cmLocalVisualStudio10Generator(VSVersion v);
|
||||||
|
|
||||||
virtual ~cmLocalVisualStudio10Generator();
|
virtual ~cmLocalVisualStudio10Generator();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
|
|
||||||
#include <cmsys/RegularExpression.hxx>
|
#include <cmsys/RegularExpression.hxx>
|
||||||
|
|
||||||
cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator()
|
cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator():
|
||||||
|
cmLocalVisualStudioGenerator(VS6)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@ private:
|
||||||
extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[];
|
extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[];
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator()
|
cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator(VSVersion v):
|
||||||
|
cmLocalVisualStudioGenerator(v)
|
||||||
{
|
{
|
||||||
this->Version = 7;
|
|
||||||
this->PlatformName = "Win32";
|
this->PlatformName = "Win32";
|
||||||
this->ExtraFlagTable = 0;
|
this->ExtraFlagTable = 0;
|
||||||
this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
|
this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
|
||||||
|
@ -719,7 +719,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||||
t = Options::FortranCompiler;
|
t = Options::FortranCompiler;
|
||||||
table = cmLocalVisualStudio7GeneratorFortranFlagTable;
|
table = cmLocalVisualStudio7GeneratorFortranFlagTable;
|
||||||
}
|
}
|
||||||
Options targetOptions(this, this->Version, t,
|
Options targetOptions(this, t,
|
||||||
table,
|
table,
|
||||||
this->ExtraFlagTable);
|
this->ExtraFlagTable);
|
||||||
targetOptions.FixExceptionHandlingDefault();
|
targetOptions.FixExceptionHandlingDefault();
|
||||||
|
@ -888,7 +888,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||||
// end of <Tool Name=VCMIDLTool
|
// end of <Tool Name=VCMIDLTool
|
||||||
|
|
||||||
// Check if we need the FAT32 workaround.
|
// Check if we need the FAT32 workaround.
|
||||||
if(targetBuilds && this->Version >= 8)
|
if(targetBuilds && this->Version >= VS8)
|
||||||
{
|
{
|
||||||
// Check the filesystem type where the target will be written.
|
// Check the filesystem type where the target will be written.
|
||||||
if(cmLVS6G_IsFAT(target.GetDirectory(configName).c_str()))
|
if(cmLVS6G_IsFAT(target.GetDirectory(configName).c_str()))
|
||||||
|
@ -975,7 +975,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||||
extraLinkOptions += " ";
|
extraLinkOptions += " ";
|
||||||
extraLinkOptions += targetLinkFlags;
|
extraLinkOptions += targetLinkFlags;
|
||||||
}
|
}
|
||||||
Options linkOptions(this, this->Version, Options::Linker,
|
Options linkOptions(this, Options::Linker,
|
||||||
cmLocalVisualStudio7GeneratorLinkFlagTable);
|
cmLocalVisualStudio7GeneratorLinkFlagTable);
|
||||||
linkOptions.Parse(extraLinkOptions.c_str());
|
linkOptions.Parse(extraLinkOptions.c_str());
|
||||||
if(!this->ModuleDefinitionFile.empty())
|
if(!this->ModuleDefinitionFile.empty())
|
||||||
|
@ -1604,7 +1604,7 @@ void cmLocalVisualStudio7Generator
|
||||||
tool = Options::FortranCompiler;
|
tool = Options::FortranCompiler;
|
||||||
table = cmLocalVisualStudio7GeneratorFortranFlagTable;
|
table = cmLocalVisualStudio7GeneratorFortranFlagTable;
|
||||||
}
|
}
|
||||||
Options fileOptions(this, this->Version, tool, table,
|
Options fileOptions(this, tool, table,
|
||||||
this->ExtraFlagTable);
|
this->ExtraFlagTable);
|
||||||
fileOptions.Parse(fc.CompileFlags.c_str());
|
fileOptions.Parse(fc.CompileFlags.c_str());
|
||||||
fileOptions.AddDefines(fc.CompileDefs.c_str());
|
fileOptions.AddDefines(fc.CompileDefs.c_str());
|
||||||
|
@ -1920,13 +1920,13 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
|
||||||
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
|
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
|
||||||
<< "<VisualStudioProject\n"
|
<< "<VisualStudioProject\n"
|
||||||
<< "\tProjectType=\"Visual C++\"\n";
|
<< "\tProjectType=\"Visual C++\"\n";
|
||||||
if(this->Version == 71)
|
if(this->Version == VS71)
|
||||||
{
|
{
|
||||||
fout << "\tVersion=\"7.10\"\n";
|
fout << "\tVersion=\"7.10\"\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fout << "\tVersion=\"" << this->Version << ".00\"\n";
|
fout << "\tVersion=\"" << (this->Version/10) << ".00\"\n";
|
||||||
}
|
}
|
||||||
const char* projLabel = target.GetProperty("PROJECT_LABEL");
|
const char* projLabel = target.GetProperty("PROJECT_LABEL");
|
||||||
if(!projLabel)
|
if(!projLabel)
|
||||||
|
@ -1941,7 +1941,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
|
||||||
cmGlobalVisualStudio7Generator* gg =
|
cmGlobalVisualStudio7Generator* gg =
|
||||||
static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
|
static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
|
||||||
fout << "\tName=\"" << projLabel << "\"\n";
|
fout << "\tName=\"" << projLabel << "\"\n";
|
||||||
if(this->Version >= 8)
|
if(this->Version >= VS8)
|
||||||
{
|
{
|
||||||
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
|
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalVisualStudio7Generator();
|
cmLocalVisualStudio7Generator(VSVersion v);
|
||||||
|
|
||||||
virtual ~cmLocalVisualStudio7Generator();
|
virtual ~cmLocalVisualStudio7Generator();
|
||||||
|
|
||||||
|
@ -53,9 +53,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetBuildType(BuildType,const char *name);
|
void SetBuildType(BuildType,const char *name);
|
||||||
|
|
||||||
void SetVersion71() {this->Version = 71;}
|
|
||||||
void SetVersion8() {this->Version = 8;}
|
|
||||||
void SetVersion9() {this->Version = 9;}
|
|
||||||
void SetPlatformName(const char* n) { this->PlatformName = n;}
|
void SetPlatformName(const char* n) { this->PlatformName = n;}
|
||||||
void GetTargetObjectFileDirectories(cmTarget* target,
|
void GetTargetObjectFileDirectories(cmTarget* target,
|
||||||
std::vector<std::string>&
|
std::vector<std::string>&
|
||||||
|
@ -130,7 +127,6 @@ private:
|
||||||
|
|
||||||
cmVS7FlagTable const* ExtraFlagTable;
|
cmVS7FlagTable const* ExtraFlagTable;
|
||||||
std::string ModuleDefinitionFile;
|
std::string ModuleDefinitionFile;
|
||||||
int Version;
|
|
||||||
bool FortranProject;
|
bool FortranProject;
|
||||||
std::string PlatformName; // Win32 or x64
|
std::string PlatformName; // Win32 or x64
|
||||||
cmLocalVisualStudio7GeneratorInternals* Internal;
|
cmLocalVisualStudio7GeneratorInternals* Internal;
|
||||||
|
|
|
@ -18,10 +18,11 @@
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator()
|
cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator(VSVersion v)
|
||||||
{
|
{
|
||||||
this->WindowsShell = true;
|
this->WindowsShell = true;
|
||||||
this->WindowsVSIDE = true;
|
this->WindowsVSIDE = true;
|
||||||
|
this->Version = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -29,7 +29,19 @@ class cmCustomCommand;
|
||||||
class cmLocalVisualStudioGenerator : public cmLocalGenerator
|
class cmLocalVisualStudioGenerator : public cmLocalGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalVisualStudioGenerator();
|
/** Known versions of Visual Studio. */
|
||||||
|
enum VSVersion
|
||||||
|
{
|
||||||
|
VS6 = 60,
|
||||||
|
VS7 = 70,
|
||||||
|
VS71 = 71,
|
||||||
|
VS8 = 80,
|
||||||
|
VS9 = 90,
|
||||||
|
VS10 = 100,
|
||||||
|
VS11 = 110
|
||||||
|
};
|
||||||
|
|
||||||
|
cmLocalVisualStudioGenerator(VSVersion v);
|
||||||
virtual ~cmLocalVisualStudioGenerator();
|
virtual ~cmLocalVisualStudioGenerator();
|
||||||
|
|
||||||
/** Construct a script from the given list of command lines. */
|
/** Construct a script from the given list of command lines. */
|
||||||
|
@ -41,6 +53,9 @@ public:
|
||||||
sequence of custom commands. */
|
sequence of custom commands. */
|
||||||
const char* GetReportErrorLabel() const;
|
const char* GetReportErrorLabel() const;
|
||||||
|
|
||||||
|
/** Version of Visual Studio. */
|
||||||
|
VSVersion GetVersion() const { return this->Version; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const char* ReportErrorLabel() const;
|
virtual const char* ReportErrorLabel() const;
|
||||||
virtual bool CustomCommandUseLocal() const { return false; }
|
virtual bool CustomCommandUseLocal() const { return false; }
|
||||||
|
@ -58,6 +73,8 @@ protected:
|
||||||
std::map<cmStdString, int>& count);
|
std::map<cmStdString, int>& count);
|
||||||
std::set<const cmSourceFile*> NeedObjectName;
|
std::set<const cmSourceFile*> NeedObjectName;
|
||||||
friend class cmVisualStudio10TargetGenerator;
|
friend class cmVisualStudio10TargetGenerator;
|
||||||
|
|
||||||
|
VSVersion Version;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -913,7 +913,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
||||||
hasFlags = true;
|
hasFlags = true;
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
clOptions(this->LocalGenerator,
|
clOptions(this->LocalGenerator,
|
||||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
cmVisualStudioGeneratorOptions::Compiler,
|
||||||
cmVS10CLFlagTable, 0, this);
|
cmVS10CLFlagTable, 0, this);
|
||||||
clOptions.Parse(flags.c_str());
|
clOptions.Parse(flags.c_str());
|
||||||
clOptions.AddDefines(configDefines.c_str());
|
clOptions.AddDefines(configDefines.c_str());
|
||||||
|
@ -1098,7 +1098,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||||
// TODO: Integrate code below with cmLocalVisualStudio7Generator.
|
// TODO: Integrate code below with cmLocalVisualStudio7Generator.
|
||||||
|
|
||||||
cmsys::auto_ptr<Options> pOptions(
|
cmsys::auto_ptr<Options> pOptions(
|
||||||
new Options(this->LocalGenerator, 10, Options::Compiler,
|
new Options(this->LocalGenerator, Options::Compiler,
|
||||||
cmVS10CLFlagTable));
|
cmVS10CLFlagTable));
|
||||||
Options& clOptions = *pOptions;
|
Options& clOptions = *pOptions;
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
|
||||||
{
|
{
|
||||||
this->WriteString("<Lib>\n", 2);
|
this->WriteString("<Lib>\n", 2);
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
libOptions(this->LocalGenerator, 10,
|
libOptions(this->LocalGenerator,
|
||||||
cmVisualStudioGeneratorOptions::Linker,
|
cmVisualStudioGeneratorOptions::Linker,
|
||||||
cmVS10LibFlagTable, 0, this);
|
cmVS10LibFlagTable, 0, this);
|
||||||
libOptions.Parse(libflags?libflags:"");
|
libOptions.Parse(libflags?libflags:"");
|
||||||
|
@ -1333,7 +1333,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
||||||
flags += flagsConfig;
|
flags += flagsConfig;
|
||||||
}
|
}
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
linkOptions(this->LocalGenerator, 10,
|
linkOptions(this->LocalGenerator,
|
||||||
cmVisualStudioGeneratorOptions::Linker,
|
cmVisualStudioGeneratorOptions::Linker,
|
||||||
cmVS10LinkFlagTable, 0, this);
|
cmVS10LinkFlagTable, 0, this);
|
||||||
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
||||||
|
|
|
@ -25,14 +25,13 @@ inline std::string cmVisualStudioGeneratorOptionsEscapeForXML(const char* s)
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
::cmVisualStudioGeneratorOptions(cmLocalGenerator* lg,
|
::cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
|
||||||
int version,
|
|
||||||
Tool tool,
|
Tool tool,
|
||||||
cmVS7FlagTable const* table,
|
cmVS7FlagTable const* table,
|
||||||
cmVS7FlagTable const* extraTable,
|
cmVS7FlagTable const* extraTable,
|
||||||
cmVisualStudio10TargetGenerator* g):
|
cmVisualStudio10TargetGenerator* g):
|
||||||
cmIDEOptions(),
|
cmIDEOptions(),
|
||||||
LocalGenerator(lg), Version(version), CurrentTool(tool),
|
LocalGenerator(lg), Version(lg->GetVersion()), CurrentTool(tool),
|
||||||
TargetGenerator(g)
|
TargetGenerator(g)
|
||||||
{
|
{
|
||||||
// Store the given flag tables.
|
// Store the given flag tables.
|
||||||
|
@ -61,11 +60,12 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault()
|
||||||
// remove the flag we need to override the IDE default of on.
|
// remove the flag we need to override the IDE default of on.
|
||||||
switch (this->Version)
|
switch (this->Version)
|
||||||
{
|
{
|
||||||
case 7:
|
case cmLocalVisualStudioGenerator::VS7:
|
||||||
case 71:
|
case cmLocalVisualStudioGenerator::VS71:
|
||||||
this->FlagMap["ExceptionHandling"] = "FALSE";
|
this->FlagMap["ExceptionHandling"] = "FALSE";
|
||||||
break;
|
break;
|
||||||
case 10:
|
case cmLocalVisualStudioGenerator::VS10:
|
||||||
|
case cmLocalVisualStudioGenerator::VS11:
|
||||||
// by default VS puts <ExceptionHandling></ExceptionHandling> empty
|
// by default VS puts <ExceptionHandling></ExceptionHandling> empty
|
||||||
// for a project, to make our projects look the same put a new line
|
// for a project, to make our projects look the same put a new line
|
||||||
// and space over for the closing </ExceptionHandling> as the default
|
// and space over for the closing </ExceptionHandling> as the default
|
||||||
|
@ -93,7 +93,8 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose)
|
||||||
if(verbose &&
|
if(verbose &&
|
||||||
this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end())
|
this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end())
|
||||||
{
|
{
|
||||||
this->FlagMap["SuppressStartupBanner"] = this->Version < 10 ? "FALSE" : "";
|
this->FlagMap["SuppressStartupBanner"] =
|
||||||
|
this->Version < cmLocalVisualStudioGenerator::VS10 ? "FALSE" : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +212,7 @@ cmVisualStudioGeneratorOptions
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this->Version == 10)
|
if(this->Version >= cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
// if there are configuration specifc flags, then
|
// if there are configuration specifc flags, then
|
||||||
// use the configuration specific tag for PreprocessorDefinitions
|
// use the configuration specific tag for PreprocessorDefinitions
|
||||||
|
@ -239,7 +240,7 @@ cmVisualStudioGeneratorOptions
|
||||||
{
|
{
|
||||||
// Escape the definition for the compiler.
|
// Escape the definition for the compiler.
|
||||||
std::string define;
|
std::string define;
|
||||||
if(this->Version != 10)
|
if(this->Version < cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
define =
|
define =
|
||||||
this->LocalGenerator->EscapeForShell(di->c_str(), true);
|
this->LocalGenerator->EscapeForShell(di->c_str(), true);
|
||||||
|
@ -249,7 +250,7 @@ cmVisualStudioGeneratorOptions
|
||||||
define = *di;
|
define = *di;
|
||||||
}
|
}
|
||||||
// Escape this flag for the IDE.
|
// Escape this flag for the IDE.
|
||||||
if(this->Version == 10)
|
if(this->Version >= cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str());
|
define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str());
|
||||||
|
|
||||||
|
@ -266,7 +267,7 @@ cmVisualStudioGeneratorOptions
|
||||||
fout << sep << define;
|
fout << sep << define;
|
||||||
sep = ";";
|
sep = ";";
|
||||||
}
|
}
|
||||||
if(this->Version == 10)
|
if(this->Version >= cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
fout << ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix;
|
fout << ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix;
|
||||||
}
|
}
|
||||||
|
@ -281,7 +282,7 @@ void
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
::OutputFlagMap(std::ostream& fout, const char* indent)
|
::OutputFlagMap(std::ostream& fout, const char* indent)
|
||||||
{
|
{
|
||||||
if(this->Version == 10)
|
if(this->Version >= cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
for(std::map<cmStdString, cmStdString>::iterator m = this->FlagMap.begin();
|
for(std::map<cmStdString, cmStdString>::iterator m = this->FlagMap.begin();
|
||||||
m != this->FlagMap.end(); ++m)
|
m != this->FlagMap.end(); ++m)
|
||||||
|
@ -326,7 +327,7 @@ cmVisualStudioGeneratorOptions
|
||||||
{
|
{
|
||||||
if(!this->FlagString.empty())
|
if(!this->FlagString.empty())
|
||||||
{
|
{
|
||||||
if(this->Version == 10)
|
if(this->Version >= cmLocalVisualStudioGenerator::VS10)
|
||||||
{
|
{
|
||||||
fout << prefix;
|
fout << prefix;
|
||||||
if(this->Configuration.size())
|
if(this->Configuration.size())
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#ifndef cmVisualStudioGeneratorOptions_h
|
#ifndef cmVisualStudioGeneratorOptions_h
|
||||||
#define cmVisualStudioGeneratorOptions_h
|
#define cmVisualStudioGeneratorOptions_h
|
||||||
|
|
||||||
#include "cmLocalGenerator.h"
|
#include "cmLocalVisualStudioGenerator.h"
|
||||||
|
|
||||||
#include "cmIDEOptions.h"
|
#include "cmIDEOptions.h"
|
||||||
typedef cmIDEFlagTable cmVS7FlagTable;
|
typedef cmIDEFlagTable cmVS7FlagTable;
|
||||||
|
@ -30,8 +30,7 @@ public:
|
||||||
Linker,
|
Linker,
|
||||||
FortranCompiler
|
FortranCompiler
|
||||||
};
|
};
|
||||||
cmVisualStudioGeneratorOptions(cmLocalGenerator* lg,
|
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
|
||||||
int version,
|
|
||||||
Tool tool,
|
Tool tool,
|
||||||
cmVS7FlagTable const* table,
|
cmVS7FlagTable const* table,
|
||||||
cmVS7FlagTable const* extraTable = 0,
|
cmVS7FlagTable const* extraTable = 0,
|
||||||
|
@ -62,8 +61,8 @@ public:
|
||||||
const char* suffix);
|
const char* suffix);
|
||||||
void SetConfiguration(const char* config);
|
void SetConfiguration(const char* config);
|
||||||
private:
|
private:
|
||||||
cmLocalGenerator* LocalGenerator;
|
cmLocalVisualStudioGenerator* LocalGenerator;
|
||||||
int Version;
|
cmLocalVisualStudioGenerator::VSVersion Version;
|
||||||
|
|
||||||
std::string Configuration;
|
std::string Configuration;
|
||||||
Tool CurrentTool;
|
Tool CurrentTool;
|
||||||
|
|
Loading…
Reference in New Issue