From f47b4f68a9e7c14734f1aec0b7e63184b3c9f924 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Mar 2016 10:08:57 -0500 Subject: Drop Visual Studio 7 generator for VS .NET 2002 This generator has been deprecated since CMake 3.3. Remove it. --- Help/generator/Visual Studio 7.rst | 10 +- Help/release/dev/remove-vs7.0-generator.rst | 5 + Source/cmGlobalVisualStudio7Generator.cxx | 227 ---------------------------- Source/cmGlobalVisualStudio7Generator.h | 26 +--- Source/cmake.cxx | 4 - 5 files changed, 15 insertions(+), 257 deletions(-) create mode 100644 Help/release/dev/remove-vs7.0-generator.rst diff --git a/Help/generator/Visual Studio 7.rst b/Help/generator/Visual Studio 7.rst index eb426f4..54d29df 100644 --- a/Help/generator/Visual Studio 7.rst +++ b/Help/generator/Visual Studio 7.rst @@ -1,10 +1,6 @@ Visual Studio 7 --------------- -Deprected. Generates Visual Studio .NET 2002 project files. - -.. note:: - This generator is deprecated and will be removed - in a future version of CMake. It will still be - possible to build with VS 7.0 tools using the - :generator:`NMake Makefiles` generator. +Removed. This once generated Visual Studio .NET 2002 project files, but +the generator has been removed since CMake 3.6. It is still possible to +build with VS 7.0 tools using the :generator:`NMake Makefiles` generator. diff --git a/Help/release/dev/remove-vs7.0-generator.rst b/Help/release/dev/remove-vs7.0-generator.rst new file mode 100644 index 0000000..314bef9 --- /dev/null +++ b/Help/release/dev/remove-vs7.0-generator.rst @@ -0,0 +1,5 @@ +remove-vs7.0-generator +---------------------- + +* The :generator:`Visual Studio 7` generator (for VS .NET 2002) has been + removed. diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index f5848ab..c1c8c77 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -335,23 +335,6 @@ void cmGlobalVisualStudio7Generator::Generate() { this->CallVisualStudioMacro(MacroReload); } - - if (!this->CMakeInstance->GetIsInTryCompile() && - this->GetName() == "Visual Studio 7") - { - const char* cmakeWarnVS70 = - this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS70"); - if (!cmakeWarnVS70 || !cmSystemTools::IsOff(cmakeWarnVS70)) - { - this->CMakeInstance->IssueMessage( - cmake::WARNING, - "The \"Visual Studio 7\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS70=OFF to the cache to disable this warning." - ); - } - } } void cmGlobalVisualStudio7Generator @@ -551,71 +534,6 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( } //---------------------------------------------------------------------------- -// Write a SLN file to the stream -void cmGlobalVisualStudio7Generator -::WriteSLNFile(std::ostream& fout, - cmLocalGenerator* root, - std::vector& generators) -{ - std::vector configs; - root->GetMakefile()->GetConfigurations(configs); - - // Write out the header for a SLN file - this->WriteSLNHeader(fout); - - // Collect all targets under this root generator and the transitive - // closure of their dependencies. - TargetDependSet projectTargets; - TargetDependSet originalTargets; - this->GetTargetSets(projectTargets, originalTargets, root, generators); - OrderedTargetDependSet orderedProjectTargets(projectTargets, "ALL_BUILD"); - - this->WriteTargetsToSolution(fout, root, orderedProjectTargets); - - bool useFolderProperty = this->UseFolderProperty(); - if (useFolderProperty) - { - this->WriteFolders(fout); - } - - // Write out the configurations information for the solution - fout << "Global\n" - << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; - - int c = 0; - for(std::vector::iterator i = configs.begin(); - i != configs.end(); ++i) - { - fout << "\t\tConfigName." << c << " = " << *i << "\n"; - c++; - } - fout << "\tEndGlobalSection\n"; - // Write out project(target) depends - fout << "\tGlobalSection(ProjectDependencies) = postSolution\n"; - this->WriteTargetDepends(fout, orderedProjectTargets); - fout << "\tEndGlobalSection\n"; - - if (useFolderProperty) - { - // Write out project folders - fout << "\tGlobalSection(NestedProjects) = preSolution\n"; - this->WriteFoldersContent(fout); - fout << "\tEndGlobalSection\n"; - } - - // Write out the configurations for all the targets in the project - fout << "\tGlobalSection(ProjectConfiguration) = postSolution\n"; - this->WriteTargetConfigurations(fout, configs, orderedProjectTargets); - fout << "\tEndGlobalSection\n"; - - // Write out global sections - this->WriteSLNGlobalSections(fout, root); - - // Write the footer for the SLN file - this->WriteSLNFooter(fout); -} - -//---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) { const char *prefix = "CMAKE_FOLDER_GUID_"; @@ -680,134 +598,6 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path) return d; } -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, - const std::string& dspname, - const char* dir, - cmGeneratorTarget const* target) -{ - // check to see if this is a fortran build - const char* ext = ".vcproj"; - const char* project = - "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; - if(this->TargetIsFortranOnly(target)) - { - ext = ".vfproj"; - project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; - } - - fout << project - << dspname << "\", \"" - << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"") - << dspname << ext << "\", \"{" - << this->GetGUID(dspname) << "}\"\nEndProject\n"; - - UtilityDependsMap::iterator ui = this->UtilityDepends.find(target); - if(ui != this->UtilityDepends.end()) - { - const char* uname = ui->second.c_str(); - fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" - << uname << "\", \"" - << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"") - << uname << ".vcproj" << "\", \"{" - << this->GetGUID(uname) << "}\"\n" - << "EndProject\n"; - } -} - - - -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void -cmGlobalVisualStudio7Generator -::WriteProjectDepends(std::ostream& fout, - const std::string& dspname, - const char*, cmGeneratorTarget const* target) -{ - int depcount = 0; - std::string dspguid = this->GetGUID(dspname); - VSDependSet const& depends = this->VSTargetDepends[target]; - for(VSDependSet::const_iterator di = depends.begin(); - di != depends.end(); ++di) - { - const char* name = di->c_str(); - std::string guid = this->GetGUID(name); - if(guid.empty()) - { - std::string m = "Target: "; - m += target->GetName(); - m += " depends on unknown target: "; - m += name; - cmSystemTools::Error(m.c_str()); - } - fout << "\t\t{" << dspguid << "}." << depcount << " = {" << guid << "}\n"; - depcount++; - } - - UtilityDependsMap::iterator ui = this->UtilityDepends.find(target); - if(ui != this->UtilityDepends.end()) - { - const char* uname = ui->second.c_str(); - fout << "\t\t{" << this->GetGUID(uname) << "}.0 = {" << dspguid << "}\n"; - } -} - - -// Write a dsp file into the SLN file, Note, that dependencies from -// executables to the libraries it uses are also done here -void cmGlobalVisualStudio7Generator -::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType, - std::vector const& configs, - const std::set& configsPartOfDefaultBuild, - const std::string& platformMapping) -{ - const std::string& platformName = - !platformMapping.empty() ? platformMapping : this->GetPlatformName(); - std::string guid = this->GetGUID(name); - for(std::vector::const_iterator i = configs.begin(); - i != configs.end(); ++i) - { - fout << "\t\t{" << guid << "}." << *i - << ".ActiveCfg = " << *i << "|" << platformName << "\n"; - std::set::const_iterator - ci = configsPartOfDefaultBuild.find(*i); - if(!(ci == configsPartOfDefaultBuild.end())) - { - fout << "\t\t{" << guid << "}." << *i - << ".Build.0 = " << *i << "|" << platformName << "\n"; - } - } -} - - - -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, - const std::string& name, - const char* location, - const char* typeGuid, - const std::set&) -{ - fout << "Project(" - << "\"{" - << (typeGuid ? typeGuid : this->ExternalProjectType(location)) - << "}\") = \"" - << name << "\", \"" - << this->ConvertToSolutionPath(location) << "\", \"{" - << this->GetGUID(name) - << "}\"\n"; - fout << "EndProject\n"; -} - - - void cmGlobalVisualStudio7Generator ::WriteSLNGlobalSections(std::ostream& fout, cmLocalGenerator* root) @@ -871,21 +661,12 @@ void cmGlobalVisualStudio7Generator << "\tEndGlobalSection\n"; } - - // Standard end of dsw file void cmGlobalVisualStudio7Generator::WriteSLNFooter(std::ostream& fout) { fout << "EndGlobal\n"; } - -// ouput standard header for dsw file -void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout) -{ - fout << "Microsoft Visual Studio Solution File, Format Version 7.00\n"; -} - //---------------------------------------------------------------------------- std::string cmGlobalVisualStudio7Generator::WriteUtilityDepend( @@ -970,14 +751,6 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(std::string const& name) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio7Generator -::GetDocumentation(cmDocumentationEntry& entry) -{ - entry.Name = cmGlobalVisualStudio7Generator::GetActualName(); - entry.Brief = "Deprecated. Generates Visual Studio .NET 2002 project files."; -} - -//---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator ::AppendDirectoryForConfig(const std::string& prefix, diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index de2d35e..02f9809 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -30,15 +30,6 @@ public: const std::string& platformName = ""); ~cmGlobalVisualStudio7Generator(); - static cmGlobalGeneratorFactory* NewFactory() { - return new cmGlobalGeneratorSimpleFactory - (); } - - ///! Get the name for the generator. - virtual std::string GetName() const { - return cmGlobalVisualStudio7Generator::GetActualName();} - static std::string GetActualName() {return "Visual Studio 7";} - ///! Get the name for the platform. std::string const& GetPlatformName() const; @@ -49,9 +40,6 @@ public: virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); - /** Get the documentation entry for this generator. */ - static void GetDocumentation(cmDocumentationEntry& entry); - /** * Utilized by the generator factory to determine if this generator * supports toolsets. @@ -117,7 +105,7 @@ public: protected: virtual void Generate(); - virtual const char* GetIDEVersion() { return "7.0"; } + virtual const char* GetIDEVersion() = 0; std::string const& GetDevEnvCommand(); virtual std::string FindDevEnvCommand(); @@ -127,22 +115,22 @@ protected: virtual void OutputSLNFile(cmLocalGenerator* root, std::vector& generators); virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, - std::vector& generators); + std::vector& generators) = 0; virtual void WriteProject(std::ostream& fout, const std::string& name, const char* path, - const cmGeneratorTarget *t); + const cmGeneratorTarget *t) = 0; virtual void WriteProjectDepends(std::ostream& fout, const std::string& name, const char* path, - cmGeneratorTarget const* t); + cmGeneratorTarget const* t) = 0; virtual void WriteProjectConfigurations( std::ostream& fout, const std::string& name, cmState::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, - const std::string& platformMapping = ""); + const std::string& platformMapping = "") = 0; virtual void WriteSLNGlobalSections(std::ostream& fout, cmLocalGenerator* root); virtual void WriteSLNFooter(std::ostream& fout); - virtual void WriteSLNHeader(std::ostream& fout); + virtual void WriteSLNHeader(std::ostream& fout) = 0; virtual std::string WriteUtilityDepend(const cmGeneratorTarget *target); virtual void WriteTargetsToSolution( @@ -162,7 +150,7 @@ protected: const char* path, const char* typeGuid, const std::set& - dependencies); + dependencies) = 0; std::string ConvertToSolutionPath(const char* path); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c197dae..74364f7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -51,7 +51,6 @@ // include the generator #if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(CMAKE_BOOT_MINGW) -# include "cmGlobalVisualStudio7Generator.h" # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" # include "cmGlobalVisualStudio9Generator.h" @@ -1428,7 +1427,6 @@ int cmake::ActualConfigure() const char* GeneratorName; }; VSRegistryEntryName version[] = { - {"7.0", "Visual Studio 7"}, {"7.1", "Visual Studio 7 .NET 2003"}, {"8.0", "Visual Studio 8 2005"}, {"9.0", "Visual Studio 9 2008"}, @@ -1835,8 +1833,6 @@ void cmake::AddDefaultGenerators() this->Generators.push_back( cmGlobalVisualStudio71Generator::NewFactory()); this->Generators.push_back( - cmGlobalVisualStudio7Generator::NewFactory()); - this->Generators.push_back( cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back( cmGlobalNMakeMakefileGenerator::NewFactory()); -- cgit v0.12