diff options
author | Brad King <brad.king@kitware.com> | 2010-08-31 18:37:16 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-08-31 18:37:16 (GMT) |
commit | 3913bff9865669e24edd6ef9423a4a6153714f22 (patch) | |
tree | 88612f205240a8473e1725d61c5f2a699c1c3e07 | |
parent | 1976c45a3c65534966d51b6e2f1d460081bb49b5 (diff) | |
parent | ef4394defa22ba4288731ae65285c2f33e9e360a (diff) | |
download | CMake-3913bff9865669e24edd6ef9423a4a6153714f22.zip CMake-3913bff9865669e24edd6ef9423a4a6153714f22.tar.gz CMake-3913bff9865669e24edd6ef9423a4a6153714f22.tar.bz2 |
Merge topic 'vs-platforms'
ef4394d VS: Add ArchitectureId to VS 8 and 9 generators
4fec681 VS: Map /ENTRY linker option to EntryPointSymbol
be49129 VS: Add more TargetMachine option values
807fca4 VS: Convert PlatformName member to a virtual method
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Win64Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Win64Generator.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 19 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.h | 7 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Win64Generator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Win64Generator.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Generator.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Win64Generator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Win64Generator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 17 |
11 files changed, 45 insertions, 24 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 691502f..403507f 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -40,7 +40,7 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout) cmLocalGenerator *cmGlobalVisualStudio10Generator::CreateLocalGenerator() { cmLocalVisualStudio10Generator* lg = new cmLocalVisualStudio10Generator; - lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetPlatformName(this->GetPlatformName()); lg->SetGlobalGenerator(this); return lg; } diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx index 1004fa9..109b60d 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx @@ -16,7 +16,6 @@ //---------------------------------------------------------------------------- cmGlobalVisualStudio10Win64Generator::cmGlobalVisualStudio10Win64Generator() { - this->PlatformName = "x64"; } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h index 98ba03c..39c9d08 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.h +++ b/Source/cmGlobalVisualStudio10Win64Generator.h @@ -27,6 +27,8 @@ public: 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; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 6e0f048..2612a08 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -21,7 +21,7 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator() { this->FindMakeProgramFile = "CMakeVS8FindMake.cmake"; this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms"; - this->PlatformName = "Win32"; + this->ArchitectureId = "X86"; } //---------------------------------------------------------------------------- @@ -30,6 +30,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator() { cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; lg->SetVersion8(); + lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); return lg; @@ -55,8 +56,8 @@ void cmGlobalVisualStudio8Generator //---------------------------------------------------------------------------- void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) { - mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); - mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId); mf->AddDefinition("MSVC80", "1"); } @@ -252,8 +253,8 @@ cmGlobalVisualStudio8Generator for(std::vector<std::string>::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t" << *i << "|" << this->PlatformName << " = " << *i << "|" - << this->PlatformName << "\n"; + fout << "\t\t" << *i << "|" << this->GetPlatformName() << " = " << *i << "|" + << this->GetPlatformName() << "\n"; } fout << "\tEndGlobalSection\n"; } @@ -269,13 +270,13 @@ cmGlobalVisualStudio8Generator i != this->Configurations.end(); ++i) { fout << "\t\t{" << guid << "}." << *i - << "|" << this->PlatformName << ".ActiveCfg = " - << *i << "|" << this->PlatformName << "\n"; + << "|" << this->GetPlatformName() << ".ActiveCfg = " + << *i << "|" << this->GetPlatformName() << "\n"; if(partOfDefaultBuild) { fout << "\t\t{" << guid << "}." << *i - << "|" << this->PlatformName << ".Build.0 = " - << *i << "|" << this->PlatformName << "\n"; + << "|" << this->GetPlatformName() << ".Build.0 = " + << *i << "|" << this->GetPlatformName() << "\n"; } } } diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 9d836bd..e0d5d80 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -32,14 +32,14 @@ public: return cmGlobalVisualStudio8Generator::GetActualName();} static const char* GetActualName() {return "Visual Studio 8 2005";} + virtual const char* GetPlatformName() const {return "Win32";} + /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); - std::string const& GetPlatformName() const { return this->PlatformName; } - /** * Override Configure and Generate to add the build-system check * target. @@ -78,6 +78,7 @@ protected: virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, bool partOfDefaultBuild); - std::string PlatformName; // Win32 or x64 + + const char* ArchitectureId; }; #endif diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx index d5558bb..3469b17 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -19,7 +19,7 @@ cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator() { - this->PlatformName = "x64"; + this->ArchitectureId = "x64"; } ///! Create a local generator appropriate to this Global Generator @@ -27,7 +27,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator() { cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; lg->SetVersion8(); - lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); return lg; @@ -48,6 +48,4 @@ void cmGlobalVisualStudio8Win64Generator { this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); - mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); } diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h index 44c237c..084ba69 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.h +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -33,6 +33,8 @@ public: 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; diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index f6ae705..f8ceea0 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -25,8 +25,8 @@ cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator() //---------------------------------------------------------------------------- void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf) { - mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); - mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId); mf->AddDefinition("MSVC90", "1"); } @@ -42,6 +42,7 @@ cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator() { cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; lg->SetVersion9(); + lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); return lg; diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx index c5b9bab..ff4fd4f 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -16,7 +16,7 @@ cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator() { - this->PlatformName = "x64"; + this->ArchitectureId = "x64"; } ///! Create a local generator appropriate to this Global Generator @@ -24,7 +24,7 @@ cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator() { cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; lg->SetVersion9(); - lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); return lg; @@ -45,6 +45,4 @@ void cmGlobalVisualStudio9Win64Generator { cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); - mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); } diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h index 55abcfc..f6dcc03 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.h +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -33,6 +33,8 @@ public: 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; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index e411d3e..cb34bb6 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -466,6 +466,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = {"GenerateManifest", "MANIFEST", "enable manifest generation", "TRUE", 0}, {"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0}, {"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0}, + {"EntryPointSymbol", "ENTRY:", "sets the starting address", "", + cmVS7FlagTable::UserValue}, {"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable}, {"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "ignore all default libs", @@ -480,6 +482,21 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = {"OptimizeReferences", "OPT:REF", "Eliminate unreferenced data", "2", 0}, {"TargetMachine", "MACHINE:I386", "Machine x86", "1", 0}, {"TargetMachine", "MACHINE:X86", "Machine x86", "1", 0}, + {"TargetMachine", "MACHINE:AM33", "Machine AM33", "2", 0}, + {"TargetMachine", "MACHINE:ARM", "Machine ARM", "3", 0}, + {"TargetMachine", "MACHINE:EBC", "Machine EBC", "4", 0}, + {"TargetMachine", "MACHINE:IA64", "Machine IA64", "5", 0}, + {"TargetMachine", "MACHINE:M32R", "Machine M32R", "6", 0}, + {"TargetMachine", "MACHINE:MIPS", "Machine MIPS", "7", 0}, + {"TargetMachine", "MACHINE:MIPS16", "Machine MIPS16", "8", 0}, + {"TargetMachine", "MACHINE:MIPSFPU)", "Machine MIPSFPU", "9", 0}, + {"TargetMachine", "MACHINE:MIPSFPU16", "Machine MIPSFPU16", "10", 0}, + {"TargetMachine", "MACHINE:MIPSR41XX", "Machine MIPSR41XX", "11", 0}, + {"TargetMachine", "MACHINE:SH3", "Machine SH3", "12", 0}, + {"TargetMachine", "MACHINE:SH3DSP", "Machine SH3DSP", "13", 0}, + {"TargetMachine", "MACHINE:SH4", "Machine SH4", "14", 0}, + {"TargetMachine", "MACHINE:SH5", "Machine SH5", "15", 0}, + {"TargetMachine", "MACHINE:THUMB", "Machine THUMB", "16", 0}, {"TargetMachine", "MACHINE:X64", "Machine x64", "17", 0}, {"ModuleDefinitionFile", "DEF:", "add an export def file", "", cmVS7FlagTable::UserValue}, |