STYLE: fix line length

This commit is contained in:
Ken Martin 2006-05-11 11:47:03 -04:00
parent 039ec75730
commit bf0cb4d49a
14 changed files with 170 additions and 116 deletions

View File

@ -24,8 +24,8 @@ cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator()
this->FindMakeProgramFile = "CMakeVS6FindMake.cmake"; this->FindMakeProgramFile = "CMakeVS6FindMake.cmake";
} }
void cmGlobalVisualStudio6Generator::EnableLanguage(std::vector<std::string>const& lang, void cmGlobalVisualStudio6Generator
cmMakefile *mf) ::EnableLanguage(std::vector<std::string>const& lang, cmMakefile *mf)
{ {
mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
@ -67,16 +67,21 @@ void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf)
} }
} }
std::string cmGlobalVisualStudio6Generator::GenerateBuildCommand(const char* makeProgram, std::string cmGlobalVisualStudio6Generator
const char *projectName, const char* additionalOptions, const char *targetName, ::GenerateBuildCommand(const char* makeProgram,
const char* config, bool ignoreErrors) const char *projectName,
const char* additionalOptions,
const char *targetName,
const char* config,
bool ignoreErrors)
{ {
// Ingoring errors is not implemented in visual studio 6 // Ingoring errors is not implemented in visual studio 6
(void) ignoreErrors; (void) ignoreErrors;
// now build the test // now build the test
std::vector<std::string> mp; std::vector<std::string> mp;
mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio"
"\\6.0\\Setup;VsCommonDir]/MSDev98/Bin");
cmSystemTools::ExpandRegistryValues(mp[0]); cmSystemTools::ExpandRegistryValues(mp[0]);
std::string originalCommand = makeProgram; std::string originalCommand = makeProgram;
std::string makeCommand = std::string makeCommand =
@ -166,9 +171,10 @@ void cmGlobalVisualStudio6Generator::Generate()
// add the ALL_BUILD to the first local generator of each project // add the ALL_BUILD to the first local generator of each project
if(gen.size()) if(gen.size())
{ {
gen[0]->GetMakefile()-> gen[0]->GetMakefile()->AddUtilityCommand("ALL_BUILD", false,
AddUtilityCommand("ALL_BUILD", false, no_output, no_depends, no_working_dir, no_output, no_depends,
"echo", "Build all projects"); no_working_dir,
"echo", "Build all projects");
} }
} }
@ -183,9 +189,9 @@ void cmGlobalVisualStudio6Generator::Generate()
} }
// Write a DSW file to the stream // Write a DSW file to the stream
void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout, void cmGlobalVisualStudio6Generator
cmLocalGenerator* root, ::WriteDSWFile(std::ostream& fout,cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators) std::vector<cmLocalGenerator*>& generators)
{ {
// Write out the header for a DSW file // Write out the header for a DSW file
this->WriteDSWHeader(fout); this->WriteDSWHeader(fout);
@ -267,7 +273,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
const cmCustomCommandLines& cmds = cc.GetCommandLines(); const cmCustomCommandLines& cmds = cc.GetCommandLines();
std::string project = cmds[0][0]; std::string project = cmds[0][0];
std::string location = cmds[0][1]; std::string location = cmds[0][1];
this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); this->WriteExternalProject(fout, project.c_str(),
location.c_str(), cc.GetDepends());
} }
else else
{ {
@ -356,8 +363,9 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
this->WriteDSWFooter(fout); this->WriteDSWFooter(fout);
} }
void cmGlobalVisualStudio6Generator::OutputDSWFile(cmLocalGenerator* root, void cmGlobalVisualStudio6Generator
std::vector<cmLocalGenerator*>& generators) ::OutputDSWFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{ {
if(generators.size() == 0) if(generators.size() == 0)
{ {
@ -501,7 +509,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio6Generator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalVisualStudio6Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Visual Studio 6 project files."; entry.brief = "Generates Visual Studio 6 project files.";

View File

@ -30,7 +30,8 @@ class cmGlobalVisualStudio6Generator : public cmGlobalGenerator
{ {
public: public:
cmGlobalVisualStudio6Generator(); cmGlobalVisualStudio6Generator();
static cmGlobalGenerator* New() { return new cmGlobalVisualStudio6Generator; } static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio6Generator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {

View File

@ -45,9 +45,10 @@ void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
} }
// Write a SLN file to the stream // Write a SLN file to the stream
void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, void cmGlobalVisualStudio71Generator
cmLocalGenerator* root, ::WriteSLNFile(std::ostream& fout,
std::vector<cmLocalGenerator*>& generators) cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{ {
// Write out the header for a SLN file // Write out the header for a SLN file
this->WriteSLNHeader(fout); this->WriteSLNHeader(fout);
@ -131,7 +132,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
const cmCustomCommandLines& cmds = cc.GetCommandLines(); const cmCustomCommandLines& cmds = cc.GetCommandLines();
std::string project = cmds[0][0]; std::string project = cmds[0][0];
std::string location = cmds[0][1]; std::string location = cmds[0][1];
this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); this->WriteExternalProject(fout, project.c_str(),
location.c_str(), cc.GetDepends());
} }
else else
{ {
@ -251,12 +253,14 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; cmCustomCommand cc = l->second.GetPostBuildCommands()[0];
const cmCustomCommandLines& cmds = cc.GetCommandLines(); const cmCustomCommandLines& cmds = cc.GetCommandLines();
std::string project = cmds[0][0]; std::string project = cmds[0][0];
this->WriteProjectConfigurations(fout, project.c_str(), l->second.IsInAll()); this->WriteProjectConfigurations(fout, project.c_str(),
l->second.IsInAll());
} }
else if ((l->second.GetType() != cmTarget::INSTALL_FILES) else if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
{ {
this->WriteProjectConfigurations(fout, si->c_str(), l->second.IsInAll()); this->WriteProjectConfigurations(fout, si->c_str(),
l->second.IsInAll());
++si; ++si;
} }
} }
@ -344,12 +348,12 @@ cmGlobalVisualStudio71Generator
std::string name = i->c_str(); std::string name = i->c_str();
if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
{ {
// kind of weird removing the first 27 letters. // kind of weird removing the first 27 letters. my
// my recommendatsions: // recommendatsions: use cmCustomCommand::GetCommand() to get the
// use cmCustomCommand::GetCommand() to get the project name // project name or get rid of the target name starting with
// or get rid of the target name starting with "INCLUDE_EXTERNAL_MSPROJECT_" and use another // "INCLUDE_EXTERNAL_MSPROJECT_" and use another indicator/flag
// indicator/flag somewhere. These external project names shouldn't conflict with cmake // somewhere. These external project names shouldn't conflict
// target names anyways. // with cmake target names anyways.
name.erase(name.begin(), name.begin() + 27); name.erase(name.begin(), name.begin() + 27);
} }
std::string guid = this->GetGUID(name.c_str()); std::string guid = this->GetGUID(name.c_str());
@ -367,13 +371,13 @@ cmGlobalVisualStudio71Generator
} }
} }
// Write a dsp file into the SLN file, // Write a dsp file into the SLN file, Note, that dependencies from
// Note, that dependencies from executables to // executables to the libraries it uses are also done here
// the libraries it uses are also done here void cmGlobalVisualStudio71Generator
void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout, ::WriteExternalProject(std::ostream& fout,
const char* name, const char* name,
const char* location, const char* location,
const std::vector<std::string>& depends) const std::vector<std::string>& depends)
{ {
std::string d = cmSystemTools::ConvertToOutputPath(location); std::string d = cmSystemTools::ConvertToOutputPath(location);
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
@ -382,8 +386,8 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout,
<< this->GetGUID(name) << this->GetGUID(name)
<< "}\"\n"; << "}\"\n";
// write out the dependencies here // write out the dependencies here VS 7.1 includes dependencies with the
// VS 7.1 includes dependencies with the project instead of in the global section // project instead of in the global section
if(!depends.empty()) if(!depends.empty())
{ {
fout << "\tProjectSection(ProjectDependencies) = postProject\n"; fout << "\tProjectSection(ProjectDependencies) = postProject\n";
@ -408,22 +412,23 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout,
} }
// Write a dsp file into the SLN file, // Write a dsp file into the SLN file, Note, that dependencies from
// Note, that dependencies from executables to // executables to the libraries it uses are also done here
// the libraries it uses are also done here void cmGlobalVisualStudio71Generator
void ::WriteProjectConfigurations(std::ostream& fout,
cmGlobalVisualStudio71Generator::WriteProjectConfigurations(std::ostream& fout, const char* name,
const char* name, bool in_all_build)
bool in_all_build)
{ {
std::string guid = this->GetGUID(name); std::string guid = this->GetGUID(name);
for(std::vector<std::string>::iterator i = this->Configurations.begin(); for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i) i != this->Configurations.end(); ++i)
{ {
fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n"; fout << "\t\t{" << guid << "}." << *i
<< ".ActiveCfg = " << *i << "|Win32\n";
if (in_all_build) if (in_all_build)
{ {
fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|Win32\n"; fout << "\t\t{" << guid << "}." << *i
<< ".Build.0 = " << *i << "|Win32\n";
} }
} }
} }
@ -449,7 +454,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio71Generator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalVisualStudio71Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Visual Studio .NET 2003 project files."; entry.brief = "Generates Visual Studio .NET 2003 project files.";

View File

@ -53,7 +53,8 @@ protected:
const char* name, const char* path, cmTarget &t); const char* name, const char* path, cmTarget &t);
virtual void WriteProjectDepends(std::ostream& fout, virtual void WriteProjectDepends(std::ostream& fout,
const char* name, const char* path, cmTarget &t); const char* name, const char* path, cmTarget &t);
virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, virtual void WriteProjectConfigurations(std::ostream& fout,
const char* name,
bool in_all); bool in_all);
virtual void WriteExternalProject(std::ostream& fout, const char* name, virtual void WriteExternalProject(std::ostream& fout, const char* name,
const char* path, const char* path,

View File

@ -28,8 +28,9 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator()
} }
void cmGlobalVisualStudio7Generator::EnableLanguage(std::vector<std::string>const & lang, void cmGlobalVisualStudio7Generator
cmMakefile *mf) ::EnableLanguage(std::vector<std::string>const & lang,
cmMakefile *mf)
{ {
mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
@ -53,9 +54,10 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(std::vector<std::string>cons
const char* extraPath = cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH"); const char* extraPath = cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH");
if(extraPath) if(extraPath)
{ {
mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", mf->AddCacheDefinition
extraPath, "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", ("CMAKE_MSVCIDE_RUN_PATH", extraPath,
cmCacheManager::STATIC); "Saved environment variable CMAKE_MSVCIDE_RUN_PATH",
cmCacheManager::STATIC);
} }
} }
@ -65,9 +67,11 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
mf->AddDefinition("MSVC70", "1"); mf->AddDefinition("MSVC70", "1");
} }
std::string cmGlobalVisualStudio7Generator::GenerateBuildCommand(const char* makeProgram, std::string cmGlobalVisualStudio7Generator
const char *projectName, const char* additionalOptions, const char *targetName, ::GenerateBuildCommand(const char* makeProgram,
const char* config, bool ignoreErrors) const char *projectName,
const char* additionalOptions, const char *targetName,
const char* config, bool ignoreErrors)
{ {
// Ingoring errors is not implemented in visual studio 6 // Ingoring errors is not implemented in visual studio 6
(void) ignoreErrors; (void) ignoreErrors;
@ -168,8 +172,9 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
config == "MinSizeRel" || config == "RelWithDebInfo") config == "MinSizeRel" || config == "RelWithDebInfo")
{ {
// only add unique configurations // only add unique configurations
if(std::find(this->Configurations.begin(), if(std::find(this->Configurations.begin(),
this->Configurations.end(), config) == this->Configurations.end()) this->Configurations.end(),
config) == this->Configurations.end())
{ {
this->Configurations.push_back(config); this->Configurations.push_back(config);
} }
@ -241,8 +246,9 @@ void cmGlobalVisualStudio7Generator::Generate()
this->OutputSLNFile(); this->OutputSLNFile();
} }
void cmGlobalVisualStudio7Generator::OutputSLNFile(cmLocalGenerator* root, void cmGlobalVisualStudio7Generator
std::vector<cmLocalGenerator*>& generators) ::OutputSLNFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{ {
if(generators.size() == 0) if(generators.size() == 0)
{ {
@ -274,9 +280,10 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile()
// Write a SLN file to the stream // Write a SLN file to the stream
void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, void cmGlobalVisualStudio7Generator
cmLocalGenerator* root, ::WriteSLNFile(std::ostream& fout,
std::vector<cmLocalGenerator*>& generators) cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{ {
// Write out the header for a SLN file // Write out the header for a SLN file
this->WriteSLNHeader(fout); this->WriteSLNHeader(fout);
@ -359,7 +366,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
const cmCustomCommandLines& cmds = cc.GetCommandLines(); const cmCustomCommandLines& cmds = cc.GetCommandLines();
std::string project = cmds[0][0]; std::string project = cmds[0][0];
std::string location = cmds[0][1]; std::string location = cmds[0][1];
this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); this->WriteExternalProject(fout, project.c_str(),
location.c_str(), cc.GetDepends());
} }
else else
{ {
@ -492,8 +500,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
cmSystemTools::Error(m.c_str()); cmSystemTools::Error(m.c_str());
} }
fout << "\t\t{" << this->GetGUID(name.c_str()) << "}." << depcount << " = {" fout << "\t\t{" << this->GetGUID(name.c_str())
<< guid.c_str() << "}\n"; << "}." << depcount << " = {" << guid.c_str() << "}\n";
depcount++; depcount++;
} }
} }
@ -529,12 +537,14 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; cmCustomCommand cc = l->second.GetPostBuildCommands()[0];
const cmCustomCommandLines& cmds = cc.GetCommandLines(); const cmCustomCommandLines& cmds = cc.GetCommandLines();
std::string name = cmds[0][0]; std::string name = cmds[0][0];
this->WriteProjectConfigurations(fout, name.c_str(), l->second.IsInAll()); this->WriteProjectConfigurations(fout, name.c_str(),
l->second.IsInAll());
} }
else if ((l->second.GetType() != cmTarget::INSTALL_FILES) else if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
{ {
this->WriteProjectConfigurations(fout, si->c_str(), l->second.IsInAll()); this->WriteProjectConfigurations(fout, si->c_str(),
l->second.IsInAll());
++si; ++si;
} }
} }
@ -613,12 +623,12 @@ cmGlobalVisualStudio7Generator
std::string name = *i; std::string name = *i;
if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
{ {
// kind of weird removing the first 27 letters. // kind of weird removing the first 27 letters. my
// my recommendatsions: // recommendatsions: use cmCustomCommand::GetCommand() to get the
// use cmCustomCommand::GetCommand() to get the project name // project name or get rid of the target name starting with
// or get rid of the target name starting with "INCLUDE_EXTERNAL_MSPROJECT_" and use another // "INCLUDE_EXTERNAL_MSPROJECT_" and use another indicator/flag
// indicator/flag somewhere. These external project names shouldn't conflict with cmake // somewhere. These external project names shouldn't conflict
// target names anyways. // with cmake target names anyways.
name.erase(name.begin(), name.begin() + 27); name.erase(name.begin(), name.begin() + 27);
} }
std::string guid = this->GetGUID(name.c_str()); std::string guid = this->GetGUID(name.c_str());
@ -639,22 +649,23 @@ cmGlobalVisualStudio7Generator
} }
// Write a dsp file into the SLN file, // Write a dsp file into the SLN file, Note, that dependencies from
// Note, that dependencies from executables to // executables to the libraries it uses are also done here
// the libraries it uses are also done here void cmGlobalVisualStudio7Generator
void ::WriteProjectConfigurations(std::ostream& fout,
cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout, const char* name,
const char* name, bool in_all_build)
bool in_all_build)
{ {
std::string guid = this->GetGUID(name); std::string guid = this->GetGUID(name);
for(std::vector<std::string>::iterator i = this->Configurations.begin(); for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i) i != this->Configurations.end(); ++i)
{ {
fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n"; fout << "\t\t{" << guid << "}." << *i
<< ".ActiveCfg = " << *i << "|Win32\n";
if (in_all_build) if (in_all_build)
{ {
fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|Win32\n"; fout << "\t\t{" << guid << "}." << *i
<< ".Build.0 = " << *i << "|Win32\n";
} }
} }
} }
@ -701,7 +712,8 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name)
{ {
std::string guidStoreName = name; std::string guidStoreName = name;
guidStoreName += "_GUID_CMAKE"; guidStoreName += "_GUID_CMAKE";
const char* storedGUID = this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); const char* storedGUID =
this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str());
if(storedGUID) if(storedGUID)
{ {
return std::string(storedGUID); return std::string(storedGUID);
@ -728,8 +740,9 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
ret = reinterpret_cast<char*>(uidstr); ret = reinterpret_cast<char*>(uidstr);
RpcStringFree(&uidstr); RpcStringFree(&uidstr);
ret = cmSystemTools::UpperCase(ret); ret = cmSystemTools::UpperCase(ret);
this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), ret.c_str(), "Stored GUID", this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(),
cmCacheManager::INTERNAL); ret.c_str(), "Stored GUID",
cmCacheManager::INTERNAL);
} }
std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations() std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
@ -738,7 +751,8 @@ std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio7Generator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalVisualStudio7Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Visual Studio .NET 2002 project files."; entry.brief = "Generates Visual Studio .NET 2002 project files.";

View File

@ -30,7 +30,8 @@ class cmGlobalVisualStudio7Generator : public cmGlobalGenerator
{ {
public: public:
cmGlobalVisualStudio7Generator(); cmGlobalVisualStudio7Generator();
static cmGlobalGenerator* New() { return new cmGlobalVisualStudio7Generator; } static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio7Generator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {
@ -103,7 +104,8 @@ protected:
const char* name, const char* path, cmTarget &t); const char* name, const char* path, cmTarget &t);
virtual void WriteProjectDepends(std::ostream& fout, virtual void WriteProjectDepends(std::ostream& fout,
const char* name, const char* path, cmTarget &t); const char* name, const char* path, cmTarget &t);
virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, virtual void WriteProjectConfigurations(std::ostream& fout,
const char* name,
bool in_all); bool in_all);
virtual void WriteSLNFooter(std::ostream& fout); virtual void WriteSLNFooter(std::ostream& fout);
virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout);

View File

@ -49,7 +49,8 @@ void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio8Generator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalVisualStudio8Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Visual Studio .NET 2005 project files."; entry.brief = "Generates Visual Studio .NET 2005 project files.";
@ -96,7 +97,8 @@ void cmGlobalVisualStudio8Generator::Generate()
cmTarget* tgt = mf->FindTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET); cmTarget* tgt = mf->FindTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
if(!tgt) if(!tgt)
{ {
cmSystemTools::Error("Error adding target " CMAKE_CHECK_BUILD_SYSTEM_TARGET); cmSystemTools::Error("Error adding target "
CMAKE_CHECK_BUILD_SYSTEM_TARGET);
continue; continue;
} }
@ -115,7 +117,8 @@ void cmGlobalVisualStudio8Generator::Generate()
lmf->GetListFiles().end()); lmf->GetListFiles().end());
} }
// Sort the list of input files and remove duplicates. // Sort the list of input files and remove duplicates.
std::sort(listFiles.begin(), listFiles.end(), std::less<std::string>()); std::sort(listFiles.begin(), listFiles.end(),
std::less<std::string>());
std::vector<std::string>::iterator new_end = std::vector<std::string>::iterator new_end =
std::unique(listFiles.begin(), listFiles.end()); std::unique(listFiles.begin(), listFiles.end());
listFiles.erase(new_end, listFiles.end()); listFiles.erase(new_end, listFiles.end());
@ -147,13 +150,16 @@ void cmGlobalVisualStudio8Generator::Generate()
CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake", listFiles, CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake", listFiles,
no_main_dependency, commandLines, "Checking Build System", no_main_dependency, commandLines, "Checking Build System",
no_working_directory, true); no_working_directory, true);
if(cmSourceFile* file = mf->GetSource(CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake.rule")) if(cmSourceFile* file = mf->GetSource(CMAKE_CHECK_BUILD_SYSTEM_TARGET
".vcproj.cmake.rule"))
{ {
tgt->GetSourceFiles().push_back(file); tgt->GetSourceFiles().push_back(file);
} }
else else
{ {
cmSystemTools::Error("Error adding rule for " CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake"); cmSystemTools::Error("Error adding rule for "
CMAKE_CHECK_BUILD_SYSTEM_TARGET
".vcproj.cmake");
} }
} }
} }
@ -229,12 +235,14 @@ cmGlobalVisualStudio8Generator
for(std::vector<std::string>::iterator i = this->Configurations.begin(); for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i) i != this->Configurations.end(); ++i)
{ {
fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".ActiveCfg = " fout << "\t\t{" << guid << "}." << *i
<< *i << "|" << this->PlatformName << "\n"; << "|" << this->PlatformName << ".ActiveCfg = "
<< *i << "|" << this->PlatformName << "\n";
if (in_all_build) if (in_all_build)
{ {
fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".Build.0 = " fout << "\t\t{" << guid << "}." << *i
<< *i << "|" << this->PlatformName << "\n"; << "|" << this->PlatformName << ".Build.0 = "
<< *i << "|" << this->PlatformName << "\n";
} }
} }
} }

View File

@ -29,7 +29,8 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
{ {
public: public:
cmGlobalVisualStudio8Generator(); cmGlobalVisualStudio8Generator();
static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Generator; } static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio8Generator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {

View File

@ -38,15 +38,17 @@ cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio8Win64Generator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalVisualStudio8Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Visual Studio .NET 2005 Win64 project files."; entry.brief = "Generates Visual Studio .NET 2005 Win64 project files.";
entry.full = ""; entry.full = "";
} }
void cmGlobalVisualStudio8Win64Generator::EnableLanguage(std::vector<std::string>const & lang, void cmGlobalVisualStudio8Win64Generator
cmMakefile *mf) ::EnableLanguage(std::vector<std::string>const & lang,
cmMakefile *mf)
{ {
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf); cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf);

View File

@ -25,11 +25,13 @@
* *
* cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree
*/ */
class cmGlobalVisualStudio8Win64Generator : public cmGlobalVisualStudio8Generator class cmGlobalVisualStudio8Win64Generator :
public cmGlobalVisualStudio8Generator
{ {
public: public:
cmGlobalVisualStudio8Win64Generator(); cmGlobalVisualStudio8Win64Generator();
static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Win64Generator; } static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio8Win64Generator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {

View File

@ -26,8 +26,8 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->EmptyCommandsHack = "@cd ."; this->EmptyCommandsHack = "@cd .";
} }
void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l, void cmGlobalWatcomWMakeGenerator
cmMakefile *mf) ::EnableLanguage(std::vector<std::string>const& l, cmMakefile *mf)
{ {
// pick a default // pick a default
mf->AddDefinition("WATCOM", "1"); mf->AddDefinition("WATCOM", "1");
@ -60,7 +60,8 @@ cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalWatcomWMakeGenerator::GetDocumentation(cmDocumentationEntry& entry) const void cmGlobalWatcomWMakeGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
{ {
entry.name = this->GetName(); entry.name = this->GetName();
entry.brief = "Generates Watcom WMake makefiles."; entry.brief = "Generates Watcom WMake makefiles.";

View File

@ -40,6 +40,7 @@ cmGlobalXCode21Generator::WriteXCodePBXProj(std::ostream& fout,
fout << "objectVersion = 42;\n"; fout << "objectVersion = 42;\n";
cmXCode21Object::PrintList(this->XCodeObjects, fout); cmXCode21Object::PrintList(this->XCodeObjects, fout);
cmXCode21Object::Indent(1, fout); cmXCode21Object::Indent(1, fout);
fout << "rootObject = " << this->RootObject->GetId() << " /* Project object */;\n"; fout << "rootObject = " << this->RootObject->GetId()
<< " /* Project object */;\n";
fout << "}\n"; fout << "}\n";
} }

View File

@ -34,7 +34,8 @@ public:
std::vector<cmLocalGenerator*>& generators); std::vector<cmLocalGenerator*>& generators);
///! What is the configurations directory variable called? ///! What is the configurations directory variable called?
virtual const char* GetCMakeCFGInitDirectory() { return "$(CONFIGURATION)"; } virtual const char* GetCMakeCFGInitDirectory() {
return "$(CONFIGURATION)"; }
}; };
#endif #endif

View File

@ -79,7 +79,8 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
{ {
#if defined(CMAKE_BUILD_WITH_CMAKE) #if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser; cmXcodeVersionParser parser;
parser.ParseFile("/Developer/Applications/Xcode.app/Contents/version.plist"); parser.ParseFile
("/Developer/Applications/Xcode.app/Contents/version.plist");
if(parser.Version == 15) if(parser.Version == 15)
{ {
return new cmGlobalXCodeGenerator; return new cmGlobalXCodeGenerator;
@ -94,8 +95,8 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
ret->SetVersion(parser.Version); ret->SetVersion(parser.Version);
return ret; return ret;
#else #else
std::cerr std::cerr << "CMake should be built with cmake to use XCode, "
<< "CMake should be built with cmake to use XCode, default to Xcode 1.5\n"; "default to Xcode 1.5\n";
return new cmGlobalXCodeGenerator; return new cmGlobalXCodeGenerator;
#endif #endif
} }
@ -126,9 +127,13 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator::GenerateBuildCommand(const char* makeProgram, std::string cmGlobalXCodeGenerator
const char *projectName, const char* additionalOptions, const char *targetName, ::GenerateBuildCommand(const char* makeProgram,
const char* config, bool ignoreErrors) const char *projectName,
const char* additionalOptions,
const char *targetName,
const char* config,
bool ignoreErrors)
{ {
// Config is not used yet // Config is not used yet
(void) ignoreErrors; (void) ignoreErrors;